Add a macro or add-on to a shape's shortcut menu

Microsoft Visio Developer Reference

Add a macro or add-on to a shape's shortcut menu

  1. Select the shape.
  1. On the Window menu, click Show ShapeSheet.
  1. Click in an Action cell in an Actions section.

If you don't see an Actions section, insert one by clicking Section on the Insert menu, and then selecting the Actions check box in the Insert Section dialog box.

  1. On the Edit menu, click Action.
  1. In the Action dialog box, under Properties, enter the menu and prompt properties.
  1. Click Run macro, and then select the program you want to run from the Run macro list. Click OK.
  1. On the drawing page, right-click the shape, and then click the custom menu command on the shortcut menu to run the program.

Note You also can associate a macro or add-on with a shape by entering a formula that uses the RUNADDON function in any ShapeSheet cell.