Edit

Share via


CommandBarButton Interface

Definition

Represents a button control on a command bar.

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

Remarks

Use Controls(index), where index is the index number of the control, to return a CommandBarButton object. (The Type property of the control must be msoControlButton.)

You can also use the FindControl(Object, Object, Object, Object) method to return a CommandBarButton object.

Properties

accChild[Object] (Inherited from IAccessible)
accChildCount (Inherited from IAccessible)
accDefaultAction[Object] (Inherited from IAccessible)
accDescription[Object] (Inherited from IAccessible)
accFocus (Inherited from IAccessible)
accHelp[Object] (Inherited from IAccessible)
accHelpTopic[String, Object] (Inherited from IAccessible)
accKeyboardShortcut[Object] (Inherited from IAccessible)
accName[Object] (Inherited from IAccessible)
accParent (Inherited from IAccessible)
accRole[Object] (Inherited from IAccessible)
accSelection (Inherited from IAccessible)
accState[Object] (Inherited from IAccessible)
accValue[Object] (Inherited from IAccessible)
Application

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

(Inherited from CommandBarControl)
BeginGroup

Determines if the specified command bar control appears at the beginning of a group of controls on the command bar.

(Inherited from CommandBarControl)
BuiltIn

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

(Inherited from CommandBarControl)
BuiltInFace

Returns or sets a value that indicates if the face of a command bar button control is its original built-in face.

(Inherited from _CommandBarButton)
Caption

Returns or sets the caption text for a command bar control.

(Inherited from CommandBarControl)
Control

Reserved for internal use.

(Inherited from CommandBarControl)
Creator

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

(Inherited from CommandBarControl)
DescriptionText

Returns or sets the description for a command bar control.

(Inherited from CommandBarControl)
Enabled

Determines if the specified command bar control is enabled.

(Inherited from CommandBarControl)
FaceId

Returns or sets the ID number for the face of a command bar button control.

(Inherited from _CommandBarButton)
Height

Returns or sets the height of a command bar control.

(Inherited from CommandBarControl)
HelpContextId

Returns or sets the Help context Id number for the Help topic attached to the command bar control.

(Inherited from CommandBarControl)
HelpFile

Returns or sets the file name for the Help topic attached to the command bar control.

(Inherited from CommandBarControl)
HyperlinkType

Returns or sets the type of hyperlink associated with the specified command bar button.

(Inherited from _CommandBarButton)
Id

Returns the ID for a built-in command bar control.

(Inherited from CommandBarControl)
Index

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

(Inherited from CommandBarControl)
InstanceId

Reserved for internal use.

(Inherited from CommandBarControl)
InstanceIdPtr

Reserved for internal use.

(Inherited from _CommandBarButton)
IsPriorityDropped

Determines if the control is currently dropped from the menu or toolbar based on usage statistics and layout space.

(Inherited from CommandBarControl)
Left

Returns the horizontal position of the specified command bar control (in pixels) relative to the left edge of the screen.

(Inherited from CommandBarControl)
Mask

Returns or sets an IPictureDisp object that represents the mask image of a _CommandBarButton object.

(Inherited from _CommandBarButton)
OLEUsage

Returns or sets the OLE client and OLE server roles in which a command bar control will be used when two Microsoft Office applications are merged.

(Inherited from CommandBarControl)
OnAction

Returns or sets the name of a procedure that will run when the user clicks or changes the value of a command bar control.

(Inherited from CommandBarControl)
Parameter

Returns or sets a string that an application can use to execute a command.

(Inherited from CommandBarControl)
Parent

Returns the Parent object for the specified object.

(Inherited from CommandBarControl)
Picture

Returns or sets an IPictureDisp object representing the image of a _CommandBarButton object.

(Inherited from _CommandBarButton)
Priority

Returns or sets the priority of a command bar control.

(Inherited from CommandBarControl)
ShortcutText

Returns or sets the shortcut key text displayed next to a button control when the button appears on a menu, submenu, or shortcut menu.

(Inherited from _CommandBarButton)
State

Returns or sets the appearance of a command bar button control.

(Inherited from _CommandBarButton)
Style

Returns or sets the way a command bar button control is displayed.

(Inherited from _CommandBarButton)
Tag

Returns or sets information about the command bar control, such as data that can be used as an argument in procedures, or information that identifies the control.

(Inherited from CommandBarControl)
TooltipText

Returns or sets the text displayed in a command bar control's ScreenTip.

(Inherited from CommandBarControl)
Top

Returns the distance (in pixels) from the top edge of the specified command bar control to the top edge of the screen.

(Inherited from CommandBarControl)
Type

Returns the type of command bar control.

(Inherited from CommandBarControl)
Visible

Determines if the specified object is visible.

(Inherited from CommandBarControl)
Width

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

(Inherited from CommandBarControl)

Methods

accDoDefaultAction(Object) (Inherited from IAccessible)
accHitTest(Int32, Int32) (Inherited from IAccessible)
accLocation(Int32, Int32, Int32, Int32, Object) (Inherited from IAccessible)
accNavigate(Int32, Object) (Inherited from IAccessible)
accSelect(Int32, Object) (Inherited from IAccessible)
add_Click(_CommandBarButtonEvents_ClickEventHandler) (Inherited from _CommandBarButtonEvents_Event)
Copy(Object, Object)

Copies a command bar control to an existing command bar.

(Inherited from CommandBarControl)
CopyFace()

Copies the face of a command bar button control to the Clipboard.

(Inherited from _CommandBarButton)
Delete(Object)

Deletes the specified object from its collection.

(Inherited from CommandBarControl)
Execute()

Runs the procedure or built-in command assigned to the specified command bar control.

(Inherited from CommandBarControl)
Move(Object, Object)

Moves the specified command bar control to an existing command bar.

(Inherited from CommandBarControl)
PasteFace()

Pastes the contents of the Clipboard onto a command bar button control.

(Inherited from _CommandBarButton)
remove_Click(_CommandBarButtonEvents_ClickEventHandler) (Inherited from _CommandBarButtonEvents_Event)
Reserved1()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved2()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved3()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved4()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved5()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved6()

Reserved for internal use.

(Inherited from CommandBarControl)
Reserved7()

Reserved for internal use.

(Inherited from CommandBarControl)
Reset()

Resets a built-in command bar control to its original function and face.

(Inherited from CommandBarControl)
SetFocus()

Moves the keyboard focus to the specified command bar control.

(Inherited from CommandBarControl)

Events

Click

Occurs when the user clicks a CommandBarButton object.

(Inherited from _CommandBarButtonEvents_Event)

Applies to