CommandBarControl CommandBarControl CommandBarControl Interface

Definition

Represents a command bar control.

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

Remarks

The CommandBarControl object is a member of the CommandBarControls collection. The properties and methods of the CommandBarControl object are all shared by the CommandBarButton, CommandBarComboBox, and CommandBarPopup objects.

When writing code to work with custom command bar controls, you use the CommandBarButton, CommandBarComboBox, and CommandBarPopup objects. When writing code to work with built-in controls in the container application that cannot be represented by one of those three objects, you use the CommandBarControl object.

Use Controls(index), where index is the index number of a control, to return a CommandBarControl object. (The Type property of the control must be msoControlLabel, msoControlExpandingGrid, msoControlSplitExpandingGrid, msoControlGrid, or msoControlGauge.)

Note: Variables declared as CommandBarControl can be assigned CommandBarButton, CommandBarComboBox, and CommandBarPopup values.

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

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.

Application Application Application

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

BeginGroup BeginGroup BeginGroup

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

BuiltIn BuiltIn BuiltIn

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

Caption Caption Caption

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

Control Control Control

Reserved for internal use.

Creator Creator Creator

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

DescriptionText DescriptionText DescriptionText

Returns or sets the description for a command bar control.

Enabled Enabled Enabled

Determines if the specified command bar control is enabled.

Height Height Height

Returns or sets the height of a command bar control.

HelpContextId HelpContextId HelpContextId

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

HelpFile HelpFile HelpFile

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

Id Id Id

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

Index Index Index

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

InstanceId InstanceId InstanceId

Reserved for internal use.

IsPriorityDropped IsPriorityDropped IsPriorityDropped

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

Left Left Left

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

OLEUsage OLEUsage 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.

OnAction OnAction 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.

Parameter Parameter Parameter

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

Parent Parent Parent

Returns the Parent object for the specified object.

Priority Priority Priority

Returns or sets the priority of a command bar control.

Tag Tag 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.

TooltipText TooltipText TooltipText

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

Top Top Top

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

Type Type Type

Returns the type of command bar control.

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 control.

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)

Reserved for internal use.

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

Reserved for internal use.

Copy(Object, Object) Copy(Object, Object) Copy(Object, Object)

Copies a command bar control to an existing command bar.

Delete(Object) Delete(Object) Delete(Object)

Deletes the specified object from its collection.

Execute() Execute() Execute()

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

Move(Object, Object) Move(Object, Object) Move(Object, Object)

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

Reserved1() Reserved1() Reserved1()

Reserved for internal use.

Reserved2() Reserved2() Reserved2()

Reserved for internal use.

Reserved3() Reserved3() Reserved3()

Reserved for internal use.

Reserved4() Reserved4() Reserved4()

Reserved for internal use.

Reserved5() Reserved5() Reserved5()

Reserved for internal use.

Reserved6() Reserved6() Reserved6()

Reserved for internal use.

Reserved7() Reserved7() Reserved7()

Reserved for internal use.

Reset() Reset() Reset()

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

SetFocus() SetFocus() SetFocus()

Moves the keyboard focus to the specified command bar control.

Applies to