| View previous topic :: View next topic |
| Author |
Message |
AntonioRodrigo Newbie

Joined: 08 May 2012 Posts: 3
|
Posted: Tue May 08, 2012 11:24 pm Post subject: Attach OO writer document to another document using VB.NET |
|
|
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 |
|
 |
fjcc General User

Joined: 29 Apr 2012 Posts: 5
|
Posted: Wed May 09, 2012 8:42 am Post subject: |
|
|
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 |
|
 |
|