UIObject.ToolbarSets Property
Visio Automation Reference |
Returns the ToolbarSets collection of a UIObject object. Read-only.
Version Information
Version Added: Visio 4.0
Syntax
expression.ToolbarSets
expression A variable that represents a UIObject object.
Return Value
ToolbarSets
Remarks
If a UIObject object represents toolbars and status bars (for example, if the object was retrieved by using the BuiltInToolbars property of an Application object), its ToolbarSets collection represents all of the toolbars for that UIObject object.
Use the ItemAtID property of a ToolbarSets object to retrieve toolbars for a particular window context, for example, the drawing window. If a context does not include toolbars, it has no ToolbarSets collection.
Example
This Microsoft Visual Basic macro shows how to use the ToolbarSets 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