InvisibleApp.SetCustomToolbars Method
Visio Automation Reference |
Replaces the current built-in or custom toolbars of an application or document.
Version Information
Version Added: Visio 4.0
Syntax
expression.SetCustomToolbars(ToolbarsObject)
expression A variable that represents an InvisibleApp object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ToolbarsObject | Required | [IVUIOBJECT] | An expression that returns a UIObject object that represents the new custom toolbars. |
Return Value
nothing
Remarks
If the ToolbarsObject object was created in a separate process by using the VBA CreateObject method instead of getting the appropriate property of an Application or Document object, the SetCustomToolbars method returns an error.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the SetCustomToolbars method to replace the built-in toolbar set with the custom set. It retrieves a copy of the built-in Visio toolbars, adds a toolbar button, sets the button icon, and then replaces the toolbar set.
Before running this macro, replace path\filename in the code with the full path to and filename of an icon file (.ico) on your computer.
Visual Basic for Applications |
---|
|
See Also