Question

Is it possible to programmatically change the selected master within a specific stencil document in Visio, using VBA? If so, how would I go about doing it?

It doesn't seem possible to use the Window.Select method, since that seems to only work in the drawing page...

Was it helpful?

Solution

With Visio API only it is only possible to get selected master(s) using the Window.SelectedMasters property, but not set it (it is a readonly property).

So, there is no direct solution. If you are okay with (sort of) workaround, you can take a look at mine here (the same question):

http://visguy.com/vgforum/index.php?topic=3378.msg13172#msg13172

It simply sends keyboard keys to the stencil window right number of times :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top