According to the helpfiles that comes with OO.o 2.03 (english, windows)
the Starbasic function CreateObject can create uno objects
-----------------------------------------------------
Creates a UNO object.
This method creates instances of the type that is passed as parameter.
-----------------------------------------------------
And from what I have read elsewhere it is not possible to create an OLE
object using this function.
To create an OLE object I have to do the following.
Dim wrapper,oleService
oleService = createUnoService("com.sun.star.bridge.OleObjectFactory")
wrapper = oleService.createInstance("name_of.oleobject")
This works perfectly except for one thing, if there are a function in
the OLE service called setValue it will not work (and possible getValue
also, and perheps others), since that function cannot be translated
using the OLE bridge that is created using the OleObjectFactory, sicne
that function exists in the bridge itself.
to use the "real" setValue function I have to use the invoke function.
however by pure accident today, I discovered that CreateObject indeed do
work with OLE objects also,
wrapper = CreateObject("name_of.oleobject")
I still have to use invoke for the setValue function though.
is this new? have this been possible for a long time?
perheps the help files should reflect that it is possible, so that
others like me don't get delayed while researching this matter.
--
Christian Andersson - [EMAIL PROTECTED]
Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]