Hi Knut,
> I can't get insertnewbookmark to work.
> http://api.openoffice.org/docs/common/ref/com/sun/st
ar/text/
> XBookmarkInsertTool.html
>
> From the documentation it looks to me that I sould be
able to do:
> ThisComponent.Text.InsertNewDocument(Cursor,
"TheBookMark")
>
> What am I doing wrong?
I couldn't find any service that pretends to implement the
Interface
XBookmarkInsertTool, so I suppose it has never been
implemented.
So the following seems to be the way to go when you want to
insert a
bookmark
xText = ThisComponent.getText()
xTextCursor = xText.createTextCursor()
aBookmark =
ThisComponent.createInstance("com.sun.star.text.Bookma
rk")
aBookmark.Name="myBookmark"
xText.insertTextContent(xTextCursor, aBookmark, false)
Hope that helps
Regards
Stephan
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|