AddonName property
Gets or sets the name of an add-on associated with a menu or toolbar.
Version added
4.0
Syntax
| |
| |
object |
Required. An expression that returns an object in the Applies to list. |
addonStr |
Required String. The name of the add-on to be run or Microsoft Visual Basic for Applications (VBA) code to be executed. |
Remarks
When an item whose AddonName property is set is selected, Visio asks the VBA project of the active document to parse the AddonName property string. If VBA successfully parses the string, Visio tells VBA to execute the string. Using this technique, you can cause a menu or toolbar item to run a VBA macro or procedure, show a VBA form, log information to the Immediate window, and so on. See the ExecuteLine method for examples.
If VBA cannot parse the string, then Visio runs the add-on named by the AddonName property. If there is no such add-on, Visio does nothing.
If the AddonName property is set, Visio ignores the object's CmdNum property.
Use the AddonArgs property to specify arguments to send to the add-on when it is run.