Table of contents
TOC
折叠目录
展开目录

命令栏控件成员 (办公室)CommandBarControl Members (Office)

office 365 dev account|上次更新日期: 2017/9/25
|
1 参与者

代表命令栏控件。命令栏控件对象是CommandBarControls集合的一个成员。CommandBarButtonCommandBarComboBoxCommandBarPopup对象所有共享的属性和命令栏控件对象的方法。Represents a command bar control. 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.

代表命令栏控件。命令栏控件对象是CommandBarControls集合的一个成员。CommandBarButtonCommandBarComboBoxCommandBarPopup对象所有共享的属性和命令栏控件对象的方法。Represents a command bar control. 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.

方法Methods

名称Name说明Description
CopyCopy将一个命令栏控件复制到已有的命令栏中。Copies a command bar control to an existing command bar.
删除Delete从集合中删除命令栏控件对象。Deletes the CommandBarControl object from its collection.
ExecuteExecute运行过程或分配给指定命令栏控件控件的内置命令。Runs the procedure or built-in command assigned to the specified CommandBarControl control.
MoveMove将指定的命令栏控件移动到已有的命令栏。Moves the specified CommandBarControl to an existing command bar.
ResetReset将内置命令栏重置为默认的配置,或将内置命令栏控件重置为其原始的函数和图符。Resets a built-in command bar to its default configuration, or resets a built-in CommandBarControl to its original function and face.
SetFocusSetFocus将键盘的焦点移到指定 CommandBarControl。如果该控件被禁用或不可见,那么此方法将失败。Moves the keyboard focus to the specified CommandBarControl. If the control is disabled or isn't visible, this method will fail.

属性Properties

名称Name描述Description
ApplicationApplication获取表示命令栏控件对象 (可对一个自动化对象使用该属性来返回该对象的容器应用程序) 的容器应用程序的应用程序对象。只读的。Gets an Application object that represents the container application for the CommandBarControl object (you can use this property with an Automation object to return that object's container application). Read-only.
快捷BeginGroup如果指定的命令栏控件显示在命令栏上控件组的开头,则获取True 。读/写。Gets True if the specified command bar control appears at the beginning of a group of controls on the command bar. Read/write.
内建BuiltIn如果指定的命令栏控件是容器应用程序的内置控件,则获取True 。如果它是自定义控件,或者如果它是内置控件的OnAction属性已设置,则返回False 。只读的。Gets True if the specified command bar control is a built-in 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.
CaptionCaption获取或设置命令栏控件的标题文字。可读写。Gets or sets the caption text for a command bar control. Read/write.
CreatorCreator获取一个 32 位整数,它指示在其中创建的命令栏控件对象的应用程序。只读的。Gets a 32-bit integer that indicates the application in which the CommandBarControl object was created. Read-only.
描述DescriptionText获取或设置命令栏控件的说明。可读写。Gets or sets the description for a command bar control. Read/write.
EnabledEnabled获取或设置一个布尔值,指定命令栏控件是否已启用。读/写。Gets or sets a Boolean value specifying if the CommandBarControl is enabled. Read/write.
HeightHeight获取或设置命令栏控件控件的高度。读/写。Gets or sets the height of a CommandBarControl control. Read/write.
帮助上下文 IdHelpContextId获取或设置附加于命令栏控件帮助主题的 Id 号的帮助上下文。读/写。Gets or sets the Help context Id number for the Help topic attached to the CommandBarControl. Read/write.
帮助文件HelpFile获取或设置附加于命令栏控件帮助主题的文件名称。读/写。Gets or sets the file name for the Help topic attached to the CommandBarControl. Read/write.
IdId获取内置命令栏控件的 ID。只读的。Gets the ID for a built-in CommandBarControl. Read-only.
IndexIndex获取 * * 远 * * 代表集合中的命令栏控件对象的索引号。只读的。Gets a ** Long** representing the index number for a CommandBarControl object in the collection. Read-only.
IsPriorityDroppedIsPriorityDropped如果控件从菜单或工具栏根据使用统计和布局空间将中略去,则获取True 。(请注意,这不是控件的可见性由可见性属性设置为相同)。只读的。Gets True if the 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.
LeftLeft获取指定的命令栏控件的水平位置 (以像素为单位),相对于屏幕左边缘。返回与固定区域的左边的距离。只读的。Gets the horizontal position of the specified CommandBarControl (in pixels) relative to the left edge of the screen. Returns the distance from the left side of the docking area. Read-only.
OLEUsageOLEUsage获取或设置在其中合并两个 Microsoft Office 应用程序时将使用命令栏控件的 OLE 服务器角色与 OLE 客户端。读/写。Gets or sets the OLE client and OLE server roles in which a CommandBarControl will be used when two Microsoft Office applications are merged. Read/write.
OnActionOnAction获取或设置当用户单击按钮或命令栏控件的值更改时,将运行 Visual Basic 过程的名称。读/写。Gets or sets the name of a Visual Basic procedure that will run when the user clicks or changes the value of a CommandBarControl. Read/write.
参数Parameter获取或设置一个字符串,应用程序可以使用命令栏控件中执行命令。读/写。Gets or sets a string that an application can use to execute a command from a CommandBarControl. Read/write.
ParentParent获取命令栏控件对象的对象。只读的。Gets the Parent object for the CommandBarControl object. Read-only.
PriorityPriority获取或设置命令栏控件的优先级。控件的优先级将决定是否可以删除从固定的命令栏的控件是否命令栏控件不能容纳单个行中。一行中无法容纳的控件放置命令栏从右到左。读/写。Gets or sets the priority of a CommandBarControl. 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.
TagTag获取或设置有关命令栏控件,例如,可作为过程参数的数据或标识该控件的信息的信息。读/写。Gets or sets information about the CommandBarControl, such as data that can be used as an argument in procedures, or information that identifies the control. Read/write.
工具提示文字TooltipText获取或设置命令栏控件的屏幕提示中显示的文本。读/写。Gets or sets the text displayed in a CommandBarControl'sScreenTip. Read/write.
TopTop获取从指定命令栏控件的上边缘到屏幕的上边缘的距离 (以像素为单位)。只读的。Gets the distance (in pixels) from the top edge of the specified CommandBarControl to the top edge of the screen. Read-only.
类型Type获取命令栏控件的类型。只读的。Gets the type of CommandBarControl. Read-only.
VisibleVisible获取或设置命令栏控件Visible属性。命令栏控件是否可见。读/写。Gets or sets the Visible property of the CommandBarControl. True if the CommandBarControl is visible. Read/write.
WidthWidth获取或设置指定命令栏控件的宽度 (以像素为单位)。读/写。Gets or sets the width (in pixels) of the specified CommandBarControl. Read/write.
© 2018 Microsoft