On Wed, Jul 9, 2008 at 12:00 PM, Fernand Vanrie <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I can create a Bookmark in a WritterDoc but I fail to set the bookmarked
> content string.
> With the code below the string appears in the doc but the anchor.string is
> empty, is this a bug  or am i doing somthing wrong ?
>
> code:
>
> Sub MakeBookmark
> Dim Doc As Object , Cursor As Object
> Doc = ThisComponent
> Cursor = Doc.currentcontroller.ViewCursor
> Bookmark = Doc.createInstance("com.sun.star.text.Bookmark")
> Bookmark.Name = "fernand"
> Doc.Text.insertTextContent(Cursor, Bookmark, True)
> Doc.getBookmarks().getByName("fernand").Anchor.setString("the text who
> suposed to been bookmarked")
> print Doc.getBookmarks().getByName("fernand").Anchor.String
> End Sub

I think you're hitting

http://qa.openoffice.org/issues/show_bug.cgi?id=73568

(closed invalid, so don't expect this behaviour to change).

Matthias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to