Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
azimabadi
Creator III
Creator III

ActiveDocument.GetCurrentSelections

Hi everybody,

I need to save the current selection in my macro, then do something and then retrive the first selection state.

I get the current selection state with:

SET selection = ActiveDocument.GetCurrentSelections

But i cant find a simple way to set the selection state of document to this again.

I appreciate every help.

Best regards

Peyman

1 Reply
kangaroomac
Partner - Creator II
Partner - Creator II

Hi Peyman,

Not sure if you are still looking for a solution. One possible way could be to create a bookmark on the selection you would like to retrieve again.

ActiveDocument.CreateUserBookmark "StateYouDesire"

(Alternative - CreateDocBookMark )

and then retrieve that state later again using:

ActiveDocument.GetBookmark "StateYouDesire"

(Alternative - Use the Bookmark object in the front-end -i.e. if it is for auditing purposes, create a variable using Dim with the current date - concatenate it to your chosen name - and use that as the name for your bookmark)

Hop this helps!