CommandBar CommandBar CommandBar Interface

Definition

Represents a command bar in the container application.

public interface class CommandBar : Microsoft::Office::Core::_IMsoOleAccDispObj
[System.Runtime.InteropServices.Guid("000C0304-0000-0000-C000-000000000046")]
public interface CommandBar : Microsoft.Office.Core._IMsoOleAccDispObj
Public Interface CommandBar
Implements _IMsoOleAccDispObj
Attributes
Implements

Remarks

The CommandBar object is a member of the _CommandBars collection.

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

You can use a 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 a 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

accChild[Object] accChild[Object] accChild[Object]

Reserved for internal use.

accChildCount accChildCount accChildCount

Reserved for internal use.

accDefaultAction[Object] accDefaultAction[Object] accDefaultAction[Object]

Reserved for internal use.

accDescription[Object] accDescription[Object] accDescription[Object]

Reserved for internal use.

accFocus accFocus accFocus

Reserved for internal use.

accHelp[Object] accHelp[Object] accHelp[Object]

Reserved for internal use.

accHelpTopic[String, Object] accHelpTopic[String, Object] accHelpTopic[String, Object]

Reserved for internal use.

accKeyboardShortcut[Object] accKeyboardShortcut[Object] accKeyboardShortcut[Object]

Reserved for internal use.

accName[Object] accName[Object] accName[Object]

Reserved for internal use.

accParent accParent accParent

Reserved for internal use.

accRole[Object] accRole[Object] accRole[Object]

Reserved for internal use.

accSelection accSelection accSelection

Reserved for internal use.

accState[Object] accState[Object] accState[Object]

Reserved for internal use.

accValue[Object] accValue[Object] accValue[Object]

Reserved for internal use.

AdaptiveMenu AdaptiveMenu AdaptiveMenu

Determines if an individual menu is enabled to use adaptive menus.

Application Application Application

Returns an Application object that represents the container application for the object.

BuiltIn BuiltIn BuiltIn

Determines if the specified command bar or command bar control is a built-in command bar or control of the container application.

Context Context Context

Returns or sets a string that determines where a command bar will be saved.

Controls Controls Controls

Returns a CommandBarControls object that represents all the controls on a command bar or pop-up control.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

Enabled Enabled Enabled

Determines if the specified command bar or is enabled.

Height Height Height

Returns or sets the height of a command bar.

Id Id Id

Reserved for internal use.

Index Index Index

Returns an Integer representing the index number for an object in the collection.

InstanceId InstanceId InstanceId

Reserved for internal use.

InstanceIdPtr InstanceIdPtr InstanceIdPtr
Left Left Left

Returns or sets the distance (in pixels) of the command bar from the left edge of the specified object relative to the screen.

Name Name Name

Returns or sets the name of the specified object.

NameLocal NameLocal NameLocal

Returns the name of a built-in command bar as it's displayed in the language version of the container application, or returns or sets the name of a custom command bar.

Parent Parent Parent

Returns the parent object for the specified object.

Position Position Position

Returns or sets the position of a command bar.

Protection Protection Protection

Returns or sets the way a command bar is protected from user customization.

RowIndex RowIndex RowIndex

Returns or sets the docking order of a command bar in relation to other command bars in the same docking area.

Top Top Top

Returns or sets the distance (in points) from the top edge of the specified command bar to the top edge of the screen.

Type Type Type

Returns the type of command bar.

Visible Visible Visible

Determines if the specified object is visible.

Width Width Width

Returns or sets the width (in pixels) of the specified command bar.

Methods

accDoDefaultAction(Object) accDoDefaultAction(Object) accDoDefaultAction(Object)

Reserved for internal use.

accHitTest(Int32, Int32) accHitTest(Int32, Int32) accHitTest(Int32, Int32)

Reserved for internal use.

accLocation(Int32, Int32, Int32, Int32, Object) accLocation(Int32, Int32, Int32, Int32, Object) accLocation(Int32, Int32, Int32, Int32, Object)

Reserved for internal use.

accNavigate(Int32, Object) accNavigate(Int32, Object) accNavigate(Int32, Object)
accSelect(Int32, Object) accSelect(Int32, Object) accSelect(Int32, Object)

Reserved for internal use.

Delete() Delete() Delete()

Deletes the specified object from the collection.

FindControl(Object, Object, Object, Object, Object) FindControl(Object, Object, Object, Object, Object) FindControl(Object, Object, Object, Object, Object)

Returns a CommandBarControl object that fits the specified criteria.

Reset() Reset() Reset()

Resets a built-in command bar to its default configuration.

ShowPopup(Object, Object) ShowPopup(Object, Object) ShowPopup(Object, Object)

Displays a command bar as a shortcut menu at the specified coordinates or at the current pointer coordinates.

Applies to