Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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!