Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically create a shape from a master

Status
Not open for further replies.

metamind

Programmer
Jul 15, 2004
20
GB
Hello again,

This is kind of linked to my last post. Since I presume it is not possible to add actions to a shape dynamically, I thought about trying to create a master with the action in it and then dynamically add new shapes to my page using that master.

I can't seem to find any documentation on how to do this though.

Thanks in advance.
 
Cool, got it from:


Dim stencil As Visio.Document, mstCircle As Visio.Master
Set stencil = ThisDocument.Application.Documents.Open("Blocks Raised.vss")
ThisDocument.Application.Windows(ThisDocument.Index).Activate
Set the ActiveWindow to the drawing window.
Set mstCircle = stencil.Masters("Circle") ' Get the master named "Circle"
and drop that shape on the page!
ThisDocument.Pages(1).Drop mstCircle, 1, 3 ' Drop the shape, mstCircle, at
location X=1 Y=3
 
When copying from other sites, you should include the author's name.

For the lurkers, metamind copied from one of my posts to the microsoft newsgroups, which has copied.



John... Visio MVP
 
No problem, I'm glad the post was helpful.

I just have mixed feelings about MCSE. they replicate the Microsoft newsgroups giving the appearance that all those messages were posted to the MCSE website, including the ones I post to the Microsoft mewsgroups. Of course, MCSE has nothing to do with Microsoft, even thouh a website of could be confused as a Microsoft site.

John... Visio MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top