Edit

Share via


CommandBars Interface

Definition

A collection of CommandBar objects that represent the command bars in the container application.

public interface class CommandBars : Microsoft::Office::Core::_CommandBars, Microsoft::Office::Core::_CommandBarsEvents_Event
[System.Runtime.InteropServices.Guid("000C0302-0000-0000-C000-000000000046")]
public interface CommandBars : Microsoft.Office.Core._CommandBars, Microsoft.Office.Core._CommandBarsEvents_Event
[<System.Runtime.InteropServices.Guid("000C0302-0000-0000-C000-000000000046")>]
type CommandBars = interface
    interface _CommandBars
    interface _CommandBarsEvents_Event
Public Interface CommandBars
Implements _CommandBars, _CommandBarsEvents_Event
Derived
Attributes
Implements

Remarks

Use the CommandBars property to return the CommandBars collection.

Use the Add(Object, Object, Object, Object) method to add a new command bar to the collection.

Use CommandBars(index), where index is the name or index number of a command bar, to return a single CommandBar object.

Note: You can use the name or index number to specify a menu bar or toolbar in the list of available menu bars and toolbars in the container application. However, you must use the name to specify a menu, shortcut menu, or submenu (all of which are represented by CommandBar objects). If two or more custom menus or submenus have the same name, CommandBars(index) returns the first one. To ensure that you return the correct menu or submenu, locate the pop-up control that displays that menu. Then apply the CommandBar property to the pop-up control to return the command bar that represents that menu.

Properties

ActionControl

Returns the CommandBarControl object whose OnAction property is set to the running procedure.

(Inherited from _CommandBars)
ActiveMenuBar

Returns a CommandBar object that represents the active menu bar in the container application.

(Inherited from _CommandBars)
AdaptiveMenus

Checks or unchecks the check box control for the option to show menus in Microsoft Office as full or personalized.

(Inherited from _CommandBars)
Application (Inherited from _IMsoDispObj)
Count

Returns or sets an Integer value indicating the number of items in the specified collection.

(Inherited from _CommandBars)
Creator (Inherited from _IMsoDispObj)
DisableAskAQuestionDropdown

Determines if the Answer Wizard dropdown menu is enabled.

(Inherited from _CommandBars)
DisableCustomize

Determines if toolbar customization is disabled.

(Inherited from _CommandBars)
DisplayFonts

Determines if the font names in the Font box are displayed in their actual fonts.

(Inherited from _CommandBars)
DisplayKeysInTooltips

Determines if shortcut keys are displayed in the ToolTips for each command bar control.

(Inherited from _CommandBars)
DisplayTooltips

Determines if ScreenTips are displayed whenever the user positions the pointer over command bar controls.

(Inherited from _CommandBars)
IdsString[Int32, String]

Reserved for internal use.

(Inherited from _CommandBars)
Item[Object]

Returns a CommandBar object from the CommandBars collection.

(Inherited from _CommandBars)
LargeButtons

Determines if the toolbar buttons displayed are larger than normal size.

(Inherited from _CommandBars)
MenuAnimationStyle

Returns or sets the way a command bar is animated.

(Inherited from _CommandBars)
Parent

Returns the parent object for the specified object.

(Inherited from _CommandBars)
TmcGetName[Int32, String]

Reserved for internal use.

(Inherited from _CommandBars)

Methods

Add(Object, Object, Object, Object)

Creates a new command bar and adds it to the collection of command bars.

(Inherited from _CommandBars)
add_OnUpdate(_CommandBarsEvents_OnUpdateEventHandler) (Inherited from _CommandBarsEvents_Event)
AddEx(Object, Object, Object, Object, Object)

Reserved for internal use.

(Inherited from _CommandBars)
CommitRenderingTransaction(Int32)

Commits the rendering transaction. Returns Nothing.

(Inherited from _CommandBars)
ExecuteMso(String)

Executes the control identified by the idMso parameter.

(Inherited from _CommandBars)
FindControl(Object, Object, Object, Object)

Returns a CommandBarControl object that fits the specified criteria.

(Inherited from _CommandBars)
FindControls(Object, Object, Object, Object)

Returns the CommandBarControls collection that fits the specified criteria.

(Inherited from _CommandBars)
GetEnabledMso(String)

Returns True if the control identified by the idMso parameter is enabled.

(Inherited from _CommandBars)
GetEnumerator() (Inherited from _CommandBars)
GetImageMso(String, Int32, Int32)

Returns an IPictureDisp object of the control image identified by the idMso parameter scaled to the dimensions specified by width and height.

(Inherited from _CommandBars)
GetLabelMso(String)

Returns the label of the control identified by the idMso parameter as a String.

(Inherited from _CommandBars)
GetPressedMso(String)

Returns a value indicating whether the toggleButton control identified by the idMso parameter is pressed.

(Inherited from _CommandBars)
GetScreentipMso(String)

Returns the screentip of the control identified by the idMso parameter as a String.

(Inherited from _CommandBars)
GetSupertipMso(String)

Returns the supertip of the control identified by the idMso parameter as a String.

(Inherited from _CommandBars)
GetVisibleMso(String)

Returns True if the control identified by the idMso parameter is visible.

(Inherited from _CommandBars)
ReleaseFocus()

Releases the user interface focus from all command bars.

(Inherited from _CommandBars)
remove_OnUpdate(_CommandBarsEvents_OnUpdateEventHandler) (Inherited from _CommandBarsEvents_Event)

Events

OnUpdate

Occurs when any change is made to a command bar.

(Inherited from _CommandBarsEvents_Event)

Applies to