UIObject.MenuSets Property
Visio Automation Reference |
Returns the MenuSets collection of a UIObject object. Read-only.
Version Information
Version Added: Visio 4.0
Syntax
expression.MenuSets
expression A variable that represents a UIObject object.
Return Value
MenuSets
Remarks
If a UIObject object represents menus and accelerators (for example, if the object was retrieved using the BuiltInMenus property of an Application or Document object), its MenuSets collection represents all of the menus for that UIObject object.
Use the ItemAtID property of a MenuSets object to retrieve menus for a particular window context such as the drawing window. If a context does not include menus, it has no MenuSets collection.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the MenuSets property to get the MenuSets collection of a UIObject object. It adds a menu and menu item to the drawing window menu set and sets the menu and menu item's Caption properties.
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