Edytuj

Udostępnij za pośrednictwem


_CommandBars.Add(Object, Object, Object, Object) Method

Definition

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

public Microsoft.Office.Core.CommandBar Add (object Name, object Position, object MenuBar, object Temporary);
abstract member Add : obj * obj * obj * obj -> Microsoft.Office.Core.CommandBar
Public Function Add (Optional Name As Object, Optional Position As Object, Optional MenuBar As Object, Optional Temporary As Object) As CommandBar

Parameters

Name
Object

Optional Object. The name of the new command bar. If this argument is omitted, a default name is assigned to the command bar (such as Custom 1).

Position
Object

Optional Object. The position or type of the new command bar. Can be one of the MsoBarPosition constants listed in the following table.ConstantDescriptionmsoBarLeft, msoBarTop, msoBarRight, msoBarBottomIndicates the left, top, right, and bottom coordinates of the new command barmsoBarFloatingIndicates that the new command bar won't be dockedmsoBarPopupIndicates that the new command bar will be a shortcut menumsoBarMenuBarMacintosh only

MenuBar
Object

Optional Object. True to replace the active menu bar with the new command bar. The default value is False.

Temporary
Object

Optional Object. True to make the new command bar temporary. Temporary command bars are deleted when the container application is closed. The default value is False.

Returns

Applies to