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

Writng text to Word giving problem

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
kalagara
General User
General User


Joined: 10 Mar 2010
Posts: 8

PostPosted: Mon Mar 15, 2010 7:47 am    Post subject: Writng text to Word giving problem Reply with quote

I'm trying to use OpenOffice 3.1 for Opening the Office Word template as well as modifying it dynamically with Database fields information at the time of opening the document from my harddisk storage location.

But the problem is Bootstrap.biitstrap() hanging and allowing to execute next lines.

Code Snippet:

Dim objDocument As Object
Dim FileNameSource As String = "C:\SysReports\FaceSheet.doc"
Dim localContext As XComponentContext

Dim sUnoIni As String = "file:///C:/Program Files/OpenOffice.org 3/URE/bin/uno.ini"
localContext = Bootstrap.biitstrap()

Dim objServiceManager As unoidl.com.sun.star.lang.XMultiServiceFactory
objServiceManager = CType(localContext.getServiceManager(), XMultiServiceFactory)

Dim objDesktop As XComponentLoader
objDesktop = CType(objServiceManager.createInstance("com.sun.star.frame.Desktop"), XComponentLoader)

Dim openProps As PropertyValue() = New PropertyValue(0) {}
openProps(0) = New PropertyValue()
openProps(0).Name = "Hidden"
openProps(0).Value = New uno.Any(True)

Dim objDocument As XComponent
objDocument = objDesktop.loadComponentFromURL(PathConverter(FileNameSource), "_default", 0, openProps) //Throwing Error from here

Plz help me to resolve this
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 Writer 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