Discussion:
How can I obtain a programmatic reference to the document stencil?
(too old to reply)
Ira Davis
2009-10-20 13:48:01 UTC
Permalink
I need to be able to drop shapes using VBA from the document stencil. I
normally use the Page.Drop method and supply a master from a named stencil.
How can I get a reference to the document's stencil?
AlEdlund
2009-10-20 14:26:32 UTC
Permalink
the 'document stencil' is actually the collection of masters in the
working document

dim visMasters as visio.masters
visMasters = application.activedocument.masters

al
Post by Ira Davis
I need to be able to drop shapes using VBA from the document stencil. I
normally use the Page.Drop method and supply a master from a named stencil.
How can I get a reference to the document's stencil?
Ira Davis
2009-11-06 16:06:01 UTC
Permalink
Thanks for the response, I think this will be useful. I had called
OpenStencilWindow method of the ThisDocument object and explored the window
object in the VBA debugger. I found that the Window had a Document property
and I was able to use the Masters collection of that property to do what I
wanted. With your info, I now have at least two ways of locating masters.

Thanks.
Post by AlEdlund
the 'document stencil' is actually the collection of masters in the
working document
dim visMasters as visio.masters
visMasters = application.activedocument.masters
al
Post by Ira Davis
I need to be able to drop shapes using VBA from the document stencil. I
normally use the Page.Drop method and supply a master from a named stencil.
How can I get a reference to the document's stencil?
Loading...