select shapes based on master variants

S

Scott

This code:
ActiveWindow.Page.CreateSelection(visSelTypeByMaster, <sel mode>,
ActiveDocument.Masters("MyMaster"))

selects all shapes on the page that are based on a master called MyMaster.
However, it doesn't select those that are based on derivatives of this
master, e.g., MyMaster.3 or MyMaster.11.

Is there a way to select all shapes based on MyMaster and MyMaster.n when I
don't know all possible values of n? I know I could iterate through the
shapes on the page but it seems to me that the point of CreateSelection is to
avoid doing that...

Thanks
 
S

Senaj Lelic [DE MVP Visio]

HI,

every master is an element on its own so there is no connection between them
once you have made these different masters at least AFAIK
 
S

Scott

Thanks, Senaj. I was afraid that was the case. I guess I just need to iterate
through the masters collection and CreateSelection for each master where the
first eight characters = "MyMaster".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top