How to reference caller shape in smarttag

S

Scott

I've added a smart tag to a shape, and have the action set to run a macro.
In the VBA code for that macro, how do I reference the shape that the smart
tag was run against?
 
K

Kari Yli-Kuha

Scott said:
I've added a smart tag to a shape, and have the action set to run a macro.
In the VBA code for that macro, how do I reference the shape that the smart
tag was run against?

In the Actions.Action cell of the shape use CALLTHIS function, eg.
CALLTHIS("ThisDocument.MyMacro",)

and define MyMacro as
Public Sub MyMacro(ByVal ovShape as Visio.Shape)

ovShape contains reference to your shape.

hth,
/C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top