MenuItem.ActionText Property
Visio Automation Reference |
Read/write. Gets or sets the action text for a menu, menu item, or toolbar item.
Version Information
Version Added: Visio 4.0
Syntax
expression.ActionText
expression A variable that represents a MenuItem object.
Return Value
String
Remarks
Action text is a string that describes the action on the Undo, Redo, and Repeat menu items on the Edit menu.
If the ActionText property is empty and the object's CmdNum property is set to one of the Microsoft Office Visio built-in command IDs, the item uses the default action text from the built-in Visio user interface.
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to set a menu item's ActionText property. It also shows how to add a menu and menu item to the drawing window menu set. This example assumes that you already have a macro in the current Visual Basic project. Before running this macro, replace macroname with the name of your macro.
Beginning with Microsoft Visio 2002, the AddOnName property used in this example cannot execute a string that contains arbitrary Microsoft Visual Basic code. To call code that in previous versions of Visio you would have passed to the AddOnName property, move it to a procedure in a document's Visual Basic project that is called from the AddOnName property, as shown in this example.
To restore the built-in menus in Microsoft Office Visio after you run this macro, call the ThisDocument.ClearCustomMenus method.
Visual Basic for Applications |
---|
|
See Also