CmdNum property
Gets or sets the command ID associated with an accelerator, menu, menu item, or toolbar item.
Version added
4.0
Syntax
| |
| |
object |
Required. An expression that returns an AccelItem, Menu, MenuItem, or ToolbarItem object. |
intVal |
Required Integer. The command ID of the object. |
Remarks
When the AddOnName property of a MenuItem or ToolbarItem object indicates an add-on to run, Visio automatically assigns a CmdNum property.
The CmdNum property for a MenuItem object that represents a submenu should be zero (0). The CmdNum property should never be zero for an AccelItem object.
To insert a separator in a menu preceding a MenuItem object or a spacer in a toolbar preceding a ToolbarItem object, use the BeginGroup property.
Valid command IDs are declared by the Visio type library in VisUICmds. They have the prefix visCmd.