Hallo Michael. Gisbert,
Michael Dannenhöfer schrieb:
>> mytextCursor=odoc.text.createtextcursor()
>>>> oBookmarks = oDoc.Bookmarks
>>>> oBookmark = oBookmarks.getByName("Datum")
>>>> oAnchor = oBookmark.getAnchor
>>>> mytextCursor.gotoRange(oAnchor,false)
>>>> mytextCursor.gotoEndofWord(true)
>>>> mytextCursor.string=""
> Hallo Thomas,
>
> das funktioniert nicht in der 2.0. Durch
> mytextCursor.gotoRange(oAnchor,false) ist die Position Ende und Start
> zugleich. collapsedtoEnd greift nicht.
> Das kann man danach mit if mytextcursor.iscollapsed prüfen. Vielleicht
> ging es mal.
OK, du hast recht. Hmm, na gut. Hab damit früher mal experiomentiert -
hatte nämlich das gleiche Problem. Und dann hatte ich es mal hinbekommen
- aber ich kann mich auch täuschen...
Egal, dann fügen wir sie hat wieder ein:
> mytextCursor=odoc.text.createtextcursor()
> oBookmarks = oDoc.Bookmarks
> oBookmark = oBookmarks.getByName("Datum")
> oAnchor = oBookmark.getAnchor
> mytextCursor.gotoRange(oAnchor,false)
> mytextCursor.gotoEndofWord(true)
> mytextCursor.string=""
mytextCursor.collapsetoStart()
oNeueBookmark = oDoc.createInstance("com.sun.star.text.Bookmark")
oNeueBookmark.setName("Datum")
oDoc.text.insertTextContent(mytextCursor, oNeueBookmark, false)
Und da ist sie wieder :-)
Viele Grüße
Thomas
--
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]