Code: Select all
sub InsertMathTypeObject
rem ----------------------------------------------------------------------
rem define variables
dim obj as object
dim SName as string
dim oXEO as object
rem ----------------------------------------------------------------------
SName = "com.sun.star.text.TextEmbeddedObject"
obj = ThisComponent.createInstance(sName)
obj.CLSID = "0002CE03-0000-0000-C000-000000000046"
obj.attach(ThisComponent.currentController().Selec tion.getByIndex(0))
oXEO = obj.ExtendedControlOverEmbeddedObject
oXEO.doVerb(0)
end sub
BASIC runtime error.Object variable not set.
at the last line (oXEO.doVerb(0))
Pleas help. The only reason I 'ditched' LO and went 'back' to OO is that my local manager gave me the above code and said it was specifially for OO. If there is a similar macro for Lo, and I knew it would work, I would go back to that - but I am kind of stuck now, so any help is appreciated. Thanks.