OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

URGENT: How to read MS Word using openOffice

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
memo421
Newbie
Newbie


Joined: 11 Nov 2009
Posts: 3

PostPosted: Wed Nov 11, 2009 10:53 am    Post subject: URGENT: How to read MS Word using openOffice Reply with quote

Hello,

How can I read Ms Word (2000-2003) document(extension .doc).

I have to use ASP.NET(VB)

Thanks
Back to top
View user's profile Send private message
memo421
Newbie
Newbie


Joined: 11 Nov 2009
Posts: 3

PostPosted: Wed Nov 11, 2009 1:53 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group