Hi, Let me know if this is the wrong place to ask this question and if it is, where to to post it so I'll get an answer
I'm translating word macros to OpenOffice.org, and I experience some turbulence... the word macros uses a lot of bookmarks to keep track of where in the document we are working . The problem that I have is that bookmarks are deleted, when they should not be deleted, and I need a solution for this. example: I search for some text: SearchDescriptor = ThisComponent.createSearchDescriptor() SearchDescriptor.SearchString = "%%%START" Match = ThisCompnent.findFirst(SearchDescriptor) Match.setString("") Bookmark = ThisComponent.createInstance("com.sun.star.text.Bookmark") Bookmark.Name = "START" 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? Or if I do 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. There is also other places where bookmarks disappears.Basically everywhere where i work with bookmarks and inserts something next to them, or delete text which is next to them. Special problem is if i do search and replace, and some text next to a bookmark is replaced. Could I insert a controllcaracher that would make sure they don't get deleted. I think, that if one would resolve this, it would make it much easier for people to convert their macros from word to OpenOffice.org, and also for the people who is working on VBA support in OpenOffice.org. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]