MenuSets.ItemAtID Property
Visio Automation Reference |
Returns the AccelTable, MenuSet, or ToolbarSet object for an ID within a collection.Read-only.
Version Information
Version Added: Visio 4.0
Syntax
expression.ItemAtID(lID)
expression A variable that represents a MenuSets object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
lID | Required | Long | The Visio context ID of the object to retrieve. |
Return Value
MenuSet
Remarks
The ID corresponds to a window or context menu. Constants for IDs are prefixed with visUIObjectSet and are declared by the Visio type library in VisUIObjSets.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the ItemAtID property to get a particular object in a collection. It also shows how to get a copy of the built-in Visio toolbars, add a toolbar button, set the button icon, and replace the built-in toolbar set with the custom set.
Before running this code, replace path\filename with the full path to and name of a valid icon (.ico) file on your computer.
To restore the built-in Visio toolbars after you run this macro, call the ThisDocument.ClearCustomToolbars method.
Visual Basic for Applications |
---|
|
See Also