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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating Visio

Status
Not open for further replies.

drluggo

Programmer
Jan 14, 2003
39
US
I am creating a visio stencil with several custom shapes. I want to associate events with these shapes such as right click, double click, etc. When I edit the stencil file (.vss), I have no problem with this by assigning the event to ThisDocument.MacroName.

My problem is that I want the behaviour to be exhibited when the user of the stencil places one of my shapes in his own drawing.

For example, I want to build a shape called "widget" inside my own stencil. When someone uses this stencil to place one of my shapes on their drawing, I want a double click to give a message "I am a widget".

This routine is in the .vss file:

Public Sub SendMessage

MsgBox "I am a widget

End Sub


When I associate the subroutine ThisDocument.SendMessage with the DoubleClick event, it works within the .vss file. However, when I just open a new drawing and insert the shape onto a random drawing the double click behaviour does not work.

I am pretty sure about why this happens with the way I have it set up but I am not sure how to do it correctly.

Any suggestions???
 
Hi drluggo,

I know Visio is part of Office, but I am not very familiar with it and I don't think many people here are. There is a separate forum devoted to Visio (Forum172) and you may have better luck with this if you post there.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top