CommandBarButton Object Members

Represents a button control on a command bar.

Methods

  Name Description
Aa433293.methods(en-us,office.12).gif Copy Copies a command bar button control to an existing command bar.
Aa433293.methods(en-us,office.12).gif CopyFace Copies the face of a command bar button control to the Clipboard.
Aa433293.methods(en-us,office.12).gif Delete Deletes the CommandBarButton object from its collection.
Aa433293.methods(en-us,office.12).gif Execute Runs the procedure or built-in command assigned to the specified CommandBarButton control.
Aa433293.methods(en-us,office.12).gif Move Moves the specified CommandBarButton control to an existing command bar.
Aa433293.methods(en-us,office.12).gif PasteFace Pastes the contents of the Clipboard onto a CommandBarButton.
Aa433293.methods(en-us,office.12).gif Reset Resets a built-in CommandBarButton control to its original function and face.
Aa433293.methods(en-us,office.12).gif SetFocus Moves the keyboard focus to the specified CommandBarButton control. If the button is disabled or isn't visible, this method will fail.

Properties

  Name Description
Aa433293.properties(en-us,office.12).gif Application Gets an Application object that represents the container application for the CommandBarButton object (you can use this property with an Automation object to return that object's container application). Read-only.
Aa433293.properties(en-us,office.12).gif BeginGroup Gets True if the specified command bar control appears at the beginning of a group of controls on the command bar. Read/write.
Aa433293.properties(en-us,office.12).gif BuiltIn Is True if the specified command bar control is a control of the container application. Returns False if it's a custom control, or if it's a built-in control whose OnAction property has been set. Read-only.
Aa433293.properties(en-us,office.12).gif BuiltInFace Is True if the face of a command bar button control is its original built-in face. Read/write.
Aa433293.properties(en-us,office.12).gif Caption Gets or sets the caption text for a command bar control. Read/write.
Aa433293.properties(en-us,office.12).gif Creator Gets a 32-bit integer that indicates the application in which the CommandBarButton object was created. Read-only.
Aa433293.properties(en-us,office.12).gif DescriptionText Gets or sets the description for a command bar button control. Read/write.
Aa433293.properties(en-us,office.12).gif Enabled True if the specified CommandBar or CommandBarControl is enabled. Read/write .
Aa433293.properties(en-us,office.12).gif FaceId Gets or sets the Id number for the face of a CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif Height Gets or sets the height of a command bar control. Read/write.
Aa433293.properties(en-us,office.12).gif HelpContextId Gets or sets the Help context Id number for the Help topic attached to the CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif HelpFile Gets or sets the file name for the Help topic attached to the CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif HyperlinkType Sets or gets a MsoCommandBarButtonHyperlinkType constant that represents the type of hyperlink associated with the specified command bar button. Read/write.
Aa433293.properties(en-us,office.12).gif Id Gets the ID for a built-in CommandBarButton control. Read-only.
Aa433293.properties(en-us,office.12).gif Index Gets a Long representing the index number for an CommandBarButton object in the collection. Read-only.
Aa433293.properties(en-us,office.12).gif IsPriorityDropped Gets True if the CommandBarButton control is currently dropped from the menu or toolbar based on usage statistics and layout space. (Note that this is not the same as the control's visibility, as set by the Visible property). Read-only.
Aa433293.properties(en-us,office.12).gif Left Set or gets the horizontal position of the specified CommandBarButton control (in pixels) relative to the left edge of the screen. Returns the distance from the left side of the docking area. Read-only.
Aa433293.properties(en-us,office.12).gif Mask Gets or sets an IPictureDisp object representing the mask image of a CommandBarButton object. The mask image determines what parts of the button image are transparent. Read/write.
Aa433293.properties(en-us,office.12).gif OLEUsage Gets or sets the OLE client and OLE server roles in which a CommandBarButton control will be used when two Microsoft Office applications are merged. Read/write.
Aa433293.properties(en-us,office.12).gif OnAction Gets or sets the name of a Visual Basic procedure that will run when the user clicks or changes the value of a CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif Parameter Gets or sets a string that an application can use to execute a command from a CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif Parent Gets the Parent object for the CommandBarButton object. Read-only.
Aa433293.properties(en-us,office.12).gif Picture Gets or sets an IPictureDisp object representing the image of a CommandBarButton object. Read/write.
Aa433293.properties(en-us,office.12).gif Priority Gets or sets the priority of a CommandBarButton control. A control's priority determines whether the control can be dropped from a docked command bar if the command bar controls can't fit in a single row. Controls that can't fit in a single row drop off command bars from right to left. Read/write.
Aa433293.properties(en-us,office.12).gif ShortcutText Gets or sets the shortcut key text displayed next to a CommandBarButton control when the button appears on a menu, submenu, or shortcut menu. Read/write.
Aa433293.properties(en-us,office.12).gif State Gets or sets the appearance of a CommandBarButton control. Read/write.
Aa433293.properties(en-us,office.12).gif Style Gets or sets the way a CommandBarButton control is displayed. Read/write.
Aa433293.properties(en-us,office.12).gif Tag Gets or sets information about the CommandBarButton control, such as data that can be used as an argument in procedures, or information that identifies the control. Read/write.
Aa433293.properties(en-us,office.12).gif TooltipText Gets or sets the text displayed in a CommandBarButton's ScreenTip. Read/write.
Aa433293.properties(en-us,office.12).gif Top Gets the distance (in pixels) from the top edge of the specified CommandBarButton control to the top edge of the screen. Read-only.
Aa433293.properties(en-us,office.12).gif Type Gets the type of CommandBarButton control. Read-only.
Aa433293.properties(en-us,office.12).gif Visible Gets or sets the Visible property of the CommandBarButton control. True if the CommandBarButton is visible. Read/write.
Aa433293.properties(en-us,office.12).gif Width Gets or sets the width (in pixels) of the specified CommandBarButton control. Read/write.

Events

  Name Description
Aa433293.events(en-us,office.12).gif Click Occurs when the user clicks a CommandBarButton object.