Hi Knut,
Then Later I do:
Cursor.gotoRange(
ThisComponent.bookmarks.getByName("START").getAnchor(), False)
Cursor.gotoRange( ThisComponent.bookmarks.getByName("END").getAnchor(),
True)
Cursor.setString("") ' Here goes my bookmarks! How can I keep them?
your cursor spans from the beginning of the bookmark "Start" to the
beginning of the bookmark "End" ... so I'd expect your code to delete
the first bookmark and keep the second untouched.
To circumvent this you could move the cursor one to the right after
moving it to "bookmarks.getByName("START").getAnchor()" by adding the line
Cursor.goRight(1,false)
This way the cursor spans from one character behind the first bookmark
to the beginning of the second and so both bookmarks should be preserved.
Cursor.gotoRange(
ThisComponent.bookmarks.getByName("START").getAnchor(), False)
Cursor.insertDocumentFromURL(SomeURL, Array())
REM then the bookmark is moved to the end, and I'm not able to track
where I started.
Here you place the cursor at the beginning of the bookmark "Start" and
insert your document there ... this way the document is inserted
_before_ the bookmark "Start" ... again the line above should enable you
to move the cursor behind the bookmark "Start" and so solve your problem.
Hope that helps
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]