Hi. How can I programmatically copy master from my stencil to the Document Stencil?
P Popovidchenko Mar 26, 2007 #1 Hi. How can I programmatically copy master from my stencil to the Document Stencil?
C Chris Roth [MVP] Mar 27, 2007 #2 Hi, Instead of dropping the master to a page, you drop it to a document. Then it goes to the document's internal "document stencil". For example: Dim mst as Visio.Master, mstNew as Visio.Master Set mst = doc1.Masters("Some Shape") set mstNew = doc2.Drop( mst, 0, 0 ) -- Hope this helps, Chris Roth Visio MVP Free Visio shapes: http://www.visguy.com/category/shapes Visio programming info: http://www.visguy.com/category/programming/ Other Visio resources: http://www.visguy.com/visio-links/
Hi, Instead of dropping the master to a page, you drop it to a document. Then it goes to the document's internal "document stencil". For example: Dim mst as Visio.Master, mstNew as Visio.Master Set mst = doc1.Masters("Some Shape") set mstNew = doc2.Drop( mst, 0, 0 ) -- Hope this helps, Chris Roth Visio MVP Free Visio shapes: http://www.visguy.com/category/shapes Visio programming info: http://www.visguy.com/category/programming/ Other Visio resources: http://www.visguy.com/visio-links/
C Chris Roth [MVP] Mar 27, 2007 #4 What's wrong with the Drop method? That's how you add masters? Other than that...write a Visio xml file, or save a copy of your drawing and delete the masters you don't want. I don't really understand why you don't want to use Drop??? -- Hope this helps, Chris Roth Visio MVP Free Visio shapes: http://www.visguy.com/category/shapes Visio programming info: http://www.visguy.com/category/programming/ Other Visio resources: http://www.visguy.com/visio-links/
What's wrong with the Drop method? That's how you add masters? Other than that...write a Visio xml file, or save a copy of your drawing and delete the masters you don't want. I don't really understand why you don't want to use Drop??? -- Hope this helps, Chris Roth Visio MVP Free Visio shapes: http://www.visguy.com/category/shapes Visio programming info: http://www.visguy.com/category/programming/ Other Visio resources: http://www.visguy.com/visio-links/
J John Marshall, MVP Apr 7, 2007 #5 Have you tried adding the custom line pattern to a shape and copying the shape to a new drawing? John... Visio MVP Need stencils or ideas? http://visio.mvps.org/3rdparty.htm Need VBA examples? http://visio.mvps.org/VBA.htm Visio Wishlist http://visio.mvps.org/wish_list.htm
Have you tried adding the custom line pattern to a shape and copying the shape to a new drawing? John... Visio MVP Need stencils or ideas? http://visio.mvps.org/3rdparty.htm Need VBA examples? http://visio.mvps.org/VBA.htm Visio Wishlist http://visio.mvps.org/wish_list.htm