CommandBarControls Object
Office Developer Reference |
A collection of CommandBarControl objects that represent the command bar controls on a command bar.
Note |
---|
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon." |
Example
Use the Controls property to return the CommandBarControls collection. The following example changes the caption of every control on the toolbar named "Standard" to the current value of the Id property for that control.
Visual Basic for Applications |
---|
|
Use the Add method to add a new command bar control to the CommandBarControls collection. This example adds a new, blank button to the command bar named "Custom."
Visual Basic for Applications |
---|
|
Use Controls(index), where
index
is the caption or index number of a control, to return a CommandBarControl, CommandBarButton, CommandBarComboBox, or CommandBarPopup object. The following example copies the first control from the command bar named "Standard" to the command bar named "Custom."
Visual Basic for Applications |
---|
|
See Also
- Object Model Reference
- CommandBarControls Object Members
- How to: Add a New Navigation Group and Move a Folder into that Group
- How to: Customize a Context Menu to Support Moving Items between Calendars
- How to: Customize an Item Context Menu
- How to: Enumerate, Show, Hide, and Position Modules in the Navigation Pane
- How to: Hide or Disable a Menu Item on a Context Menu
- How to: Share Contact Information Including the Business Card