編輯

共用方式為


_CommandBars Interface

Definition

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

public interface class _CommandBars : Microsoft::Office::Core::_IMsoDispObj, System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000C0302-0000-0000-C000-000000000046")]
public interface _CommandBars : Microsoft.Office.Core._IMsoDispObj, System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("000C0302-0000-0000-C000-000000000046")>]
type _CommandBars = interface
    interface _IMsoDispObj
    interface IEnumerable
Public Interface _CommandBars
Implements _IMsoDispObj, IEnumerable
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) (Visual Basic.NET) or CommandBars[index] (C#), 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.

ActiveMenuBar

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

AdaptiveMenus

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

Application

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

Count

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

Creator

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

DisableAskAQuestionDropdown

Determines if the Answer Wizard dropdown menu is enabled.

DisableCustomize

Determines if toolbar customization is disabled.

DisplayFonts

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

DisplayKeysInTooltips

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

DisplayTooltips

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

IdsString[Int32, String]

Reserved for internal use.

Item[Object]

Returns a CommandBar object from the CommandBars collection.

LargeButtons

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

MenuAnimationStyle

Returns or sets the way a command bar is animated.

Parent

Returns the parent object for the specified object.

TmcGetName[Int32, String]

Reserved for internal use.

Methods

Add(Object, Object, Object, Object)

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

AddEx(Object, Object, Object, Object, Object)

Reserved for internal use.

CommitRenderingTransaction(Int32)

Commits the rendering transaction. Returns Nothing.

ExecuteMso(String)

Executes the control identified by the idMso parameter.

FindControl(Object, Object, Object, Object)

Returns a CommandBarControl object that fits the specified criteria.

FindControls(Object, Object, Object, Object)

Returns the CommandBarControls collection that fits the specified criteria.

GetEnabledMso(String)

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

GetEnumerator()
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.

GetLabelMso(String)

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

GetPressedMso(String)

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

GetScreentipMso(String)

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

GetSupertipMso(String)

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

GetVisibleMso(String)

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

ReleaseFocus()

Releases the user interface focus from all command bars.

Applies to