memo421 Newbie

Joined: 11 Nov 2009 Posts: 3
|
Posted: Wed Nov 11, 2009 1:53 pm Post subject: |
|
|
I have tried this code:
Dim filetoCount As String = "C:\folder\file.doc"
Dim oSM As Object 'Root object for accessing OpenOffice from VB
Dim oDesk, oDoc As Object 'First objects from the API
Dim _args As System.Array
Dim objDummy As Object = New Object
_args = System.Array.CreateInstance(objDummy.GetType, 0)
objDummy = Nothing ' free ressource
'Instanciate OOo : this line is mandatory with VB for OOo API
oSM = CreateObject("com.sun.star.ServiceManager")
'Create the first and most important service
oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
'Open an existing doc (pay attention to the syntax for first argument)
oDoc = oDesk.loadComponentFromURL("file:///" & filetoCount, "_blank", 0, _args)
till oDoc, i works fine. How can I read content from object(oDoc)?
Thanks |
|