Hello

        I have not programmed in BASIC for decades and in VBA ever, but I am 
trying
to learn Starbasic to write some macros on openoffice.org Draw.

        I am trying out the following example :

---------------------------------------
REM  *****  BASIC  *****

Sub Main
Dim Doc As Object
Dim Page As Object
Dim RectangleShape As Object
Dim Point As New com.sun.star.awt.Point
Dim Size As New com.sun.star.awt.Size

Doc = StarDesktop.CurrentComponent
Page = Doc.drawPages(0)

Point.x = 1000
Point.y = 1000
Size.Width = 10000
Size.Height = 10000

RectangleShape = Doc.createInstance("com.sun.star.drawing.RectangleShape")
RectangleShape.Size = Size
RectangleShape.Position = Point

Page.add(RectangleShape)
End Sub

------------------------------------

Now, when I try to run this macro, I get the following error wherever I have
a method invocation (like Page=Doc.drawPages(0) or RectangleShape=Doc....
above) :

BASIC runtime error.
Property or method not found.

I am using OpenOffice.org 2.2.1 on Debian with Sid (unstable) packages. I
definitely have the openoffice.org-dev (SDK) package installed. I have
checked to make certain of that.

What am I missing in my installation ?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to