14 Replies Latest reply: Jun 3, 2013 5:57 AM by Bill Britt RSS

Problem with document/server bookmarks

Telmo Duarte

Hi all,

I have a document in QV10 that allows the user to create up to 5 bookmarks.

The names of the bookmarks are predefined values on the script and are available in a multibox:

- Model1, Model2, Model3, Model4, Model5

 

The user can then save the bookmark by clicking on a button which calls a macro with this:

     selected_model = ActiveDocument.Evaluate("getfieldselections(_Model_bookmark_dropdown)")

     ActiveDocument.RemoveDocBookmark selected_model

     ActiveDocument.CreateDocBookmark false, selected_model

 

I'm using the bookmark name so that the user can recreate any of the 5 bookmarks and so that I can use them in set analysis when doing comparisons.

It all works fine in Desktop - when a bookmark is replaced by the user the previous bookmark is removed (bookmark ID changes).

 

The problem is that this is an online product and on the webserver (AJAX client), it doesn't remove the previous bookmark but it still creates a new one with the same name and a different ID. I can confirm this by going to the QEMC. I need to be able to remove the previous bookmark because it keeps recalling the first that was created with that name.

 

How can I remove the bookmark using the macro? Any alternatives?

 

Thanks,

Telmo