Hi Knut,
Unfortunately I did not cut and paste the code from the actual code,
but here is some code copied and pasted from the actual program. And
the bookmark comes _after_ the inserted text.
dispatcher.executeDispatch(Dok.CurrentController.Frame,
".uno:InsertPagebreak", "", 0, Array())
Cursor.gotoEnd( false )
Bookmark = Dok.createInstance("com.sun.star.text.Bookmark")
Bookmark.Name = "NyttDok"
Dok.Text.insertTextContent( Cursor, Bookmark, False )
Cursor.gotoEnd( false )
Cursor.collapseToEnd()
Cursor.goRight(1, false)
Cursor.insertDocumentFromURL( ConvertToURL(KSMal3$), Array() )
looks indeed like an issue to me ... it doesn't seem to be possible to
position the cursor behing the bookmark when the bookmark is the last
element in that line ... something like
Dok=ThisComponent
Cursor=Dok.Text.createTextCursor
Cursor.gotoEnd( false )
Bookmark = Dok.createInstance("com.sun.star.text.Bookmark")
Bookmark.Name = "NyttDok"
Dok.Text.insertTextContent( Cursor, Bookmark, False )
Cursor.String="."
Cursor.insertDocumentFromURL( ConvertToURL(KSMal3$), Array() )
works tho and places the dokument behind the bookmark.
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]