Reselect a select set after macro completion

Reselect a select set after macro completion

inulobo
Advocate Advocate
306 Views
1 Reply
Message 1 of 2

Reselect a select set after macro completion

inulobo
Advocate
Advocate

Is it possible to reselect a select set at the end of a macro?

0 Likes
307 Views
1 Reply
Reply (1)
Message 2 of 2

J-Camper
Advisor
Advisor

You can store the items in an object collection and then select the object collection at the end:

 

Dim SelSet As SelectSet = ThisApplication.ActiveDocument.SelectSet
Dim Storage As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection

For Each Item In SelSet
	Storage.Add(Item)
Next

SelSet.Clear

MessageBox.Show("Cleared Select Set", "Title")

SelSet.SelectMultiple(Storage)

MessageBox.Show("Returned Select Set", "Title")

 

0 Likes