CommandBar Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
[<System.Runtime.InteropServices.Guid("000C0304-0000-0000-C000-000000000046")>]
type CommandBar = interface
interface _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] |
Reserved for internal use. |
accChildCount |
Reserved for internal use. |
accDefaultAction[Object] |
Reserved for internal use. |
accDescription[Object] |
Reserved for internal use. |
accFocus |
Reserved for internal use. |
accHelp[Object] |
Reserved for internal use. |
accHelpTopic[String, Object] |
Reserved for internal use. |
accKeyboardShortcut[Object] |
Reserved for internal use. |
accName[Object] |
Reserved for internal use. |
accParent |
Reserved for internal use. |
accRole[Object] |
Reserved for internal use. |
accSelection |
Reserved for internal use. |
accState[Object] |
Reserved for internal use. |
accValue[Object] |
Reserved for internal use. |
AdaptiveMenu |
Determines if an individual menu is enabled to use adaptive menus. |
Application |
Returns an Application object that represents the container application for the object. |
BuiltIn |
Determines if the specified command bar or command bar control is a built-in command bar or control of the container application. |
Context |
Returns or sets a string that determines where a command bar will be saved. |
Controls |
Returns a CommandBarControls object that represents all the controls on a command bar or pop-up control. |
Creator |
Returns a 32-bit integer that indicates the application in which the specified object was created. |
Enabled |
Determines if the specified command bar or is enabled. |
Height |
Returns or sets the height of a command bar. |
Id |
Reserved for internal use. |
Index |
Returns an Integer representing the index number for an object in the collection. |
InstanceId |
Reserved for internal use. |
InstanceIdPtr | |
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 |
Returns or sets the name of the specified object. |
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 |
Returns the parent object for the specified object. |
Position |
Returns or sets the position of a command bar. |
Protection |
Returns or sets the way a command bar is protected from user customization. |
RowIndex |
Returns or sets the docking order of a command bar in relation to other command bars in the same docking area. |
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 |
Returns the type of command bar. |
Visible |
Determines if the specified object is visible. |
Width |
Returns or sets the width (in pixels) of the specified command bar. |
Methods
accDoDefaultAction(Object) |
Reserved for internal use. |
accHitTest(Int32, Int32) |
Reserved for internal use. |
accLocation(Int32, Int32, Int32, Int32, Object) |
Reserved for internal use. |
accNavigate(Int32, Object) | |
accSelect(Int32, Object) |
Reserved for internal use. |
Delete() |
Deletes the specified object from the collection. |
FindControl(Object, Object, Object, Object, Object) |
Returns a CommandBarControl object that fits the specified criteria. |
Reset() |
Resets a built-in command bar to its default configuration. |
ShowPopup(Object, Object) |
Displays a command bar as a shortcut menu at the specified coordinates or at the current pointer coordinates. |