Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Macro. Get Selections. Clear All. And Return Selections.

Hello!

I ask for help.

1) As a macro, take the current selection in the field.

2) Clear all selections.

H) Other operations...

4) Return the selections from point 1 to this field.

1 Solution

Accepted Solutions
marcus_sommer

1) and 4) might be adressed by creating respectively storing the selections into a bookmark and apply it at last again.

- Marcus

View solution in original post

5 Replies
avinashelite

To clear all the selection why you need the macro ?? add a button/text box and add action to clear selections

zhadrakas
Specialist II
Specialist II

sub test

'You can save your current selection but i think you dont Need to, thats why the following two lines are commented
'set x = ActiveDocument.GetCurrentSelections
's = x.Selections
ActiveDocument.ClearAll
msgbox "DO WHAT YOU WANT TO DO"
ActiveDocument.Back
end Sub

regards

tim

marcus_sommer

1) and 4) might be adressed by creating respectively storing the selections into a bookmark and apply it at last again.

- Marcus

warfollowmy_ver
Creator III
Creator III
Author

Thank you!!!

'Remember user selections

ActiveDocument.CreateUserBookmark "BM555"

'Return user selections and delete them

ActiveDocument.RecallUserBookmark "BM555"

ActiveDocument.RemoveUserBookmark "BM555"

EternalDX
Contributor III
Contributor III

This dont function on webview, any other solutions??