Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

How can I unapply a bookmark ??

Hey guys, I'm doing a little dummy macro with bookmarks.

If I want to apply a bookmark into the document is quite easy :

ActiveDocument.RecallDocBookmark "MyBookMark"

But what if I want to undo the bookmark selection??

I've recently discovered that if you write ActiveDocument.ClearDocBookmarks, it doesn't really "clear" the bookmarks, it removes the bookmarks.

So what If I have a selection, I want to apply a bookmark, do some stuff and unapply the same bookmark. How can I do this???

Any ideas??

Many thanks in advance!

Regards.

1 Solution

Accepted Solutions
marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Hi Erich, thanks very much for listen to me.

That is the solution that it works to me :

1- Save an array with current selections.

2- Apply the bookmark

3- Save an array with new current selections.

4-Make the subtraction of the old and new array. Clear the fields of new array and re-select the fields of old array (with their own values).

Regards.

View solution in original post

2 Replies
erichshiino
Partner - Master
Partner - Master

Perhaps, you could use a macro to have the same behavior as the back button. So you go back one selection.

I may not be enought if the stuff you do makes more selections.

In this case, you could create another bookmark with the selections before you apply your bookmark. Do your stuff, then apply the first bookmark you created and delete it if you don't want to keep it permanently. (may be you don't need to remove it)

It will all depend on the things you want to do in the mean time.

Please, let me know if it works for you.

Regards,

Erich

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Hi Erich, thanks very much for listen to me.

That is the solution that it works to me :

1- Save an array with current selections.

2- Apply the bookmark

3- Save an array with new current selections.

4-Make the subtraction of the old and new array. Clear the fields of new array and re-select the fields of old array (with their own values).

Regards.