Syntax
ToolbarButtonMacro$(Toolbar$, Position [, Context])
Remarks
Returns the name of the built-in command, macro, font, AutoText entry, or style assigned to the specified toolbar button. If you specify a position that corresponds to a space, ToolbarButtonMacro$() returns an empty string ("").
Argument | Explanation |
Toolbar$ | The name of the toolbar as it appears in the Toolbars dialog box (View menu). |
Position | A number corresponding to the position of the button on the specified toolbar, where 1 is the first position, 2 is the second position, and so on. Note that a list box or space counts as one position. |
Context | Specifies the button for which to return the name: 0 (zero) The button displayed on the toolbar when a document based on the Normal template is active. 1 or omitted The button currently displayed on the toolbar. Note that the button displayed on the toolbar depends on the custom settings, if any, of the active template, any loaded global templates, and the Normal template. |
Example
This example fills an array with the names of commands assigned to the Standard toolbar when a document based on the Normal template is active.
size = CountToolbarButtons("Standard", 0) - 1 Dim standardmacro$(size) For i = 0 To size standardmacro$(i) = ToolbarButtonMacro$("Standard", i + 1, 0) Next i
See Also
CountToolbarButtons(), CountToolbars(), ToolbarName$()