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

Attach OO writer document to another document using VB.NET

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


Joined: 08 May 2012
Posts: 3

PostPosted: Tue May 08, 2012 11:24 pm    Post subject: Attach OO writer document to another document using VB.NET Reply with quote

Hello,

I am using Visual Studio 2010, VB.NET, Open Office 3.3. Writer.

I want to attach one document at the end of another document programmatically using VB.NET. Is this possible?


Greetings, Frenky
Back to top
View user's profile Send private message
fjcc
General User
General User


Joined: 29 Apr 2012
Posts: 5

PostPosted: Wed May 09, 2012 8:42 am    Post subject: Reply with quote

A post I made elsewhere shows how to do this with a text cursor using OOo Basic. It isn't exactly what you want, as it inserts at a bookmark.

Code:
Sub Main
oText = ThisComponent.Text
Mark = ThisComponent.BookMarks.getByName("Mark1")
Curs = oText.createTextCursor
Curs.gotoRange(Mark.Anchor, False)
DocToInsert = "C:\Documents and Settings\username\My Documents\DocForInsert.doc"
DocToInsertURL = convertToURL(DocToInsert)
Curs.insertDocumentFromURL(DocToInsertURL,Array())
End Sub
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