_CommandBars.Add(Object, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기