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
 
Top