CommandBars Property

Microsoft PowerPoint Visual Basic

Show All

CommandBars Property

       

CommandBars property as it applies to the Application object.

Returns a CommandBars collection that represents all the command bars in PowerPoint. Read-only.

CommandBars property as it applies to the Presentation object.

Returns a CommandBars collection that represents the merged command bar set from the host container application and PowerPoint. This property returns a valid object only when the container is a DocObject server, like Microsoft Binder, and PowerPoint is acting as an OLE server. Read-only.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

As it applies to the Application object. 

This example enlarges all command bar buttons and enables ToolTips.

With Application.CommandBars
    .LargeButtons = True
    .DisplayTooltips = True
End With

As it applies to the Presentation object. 

This example displays the Formatting command bar with the merged command bar set at the top of the application window.

With ActivePresentation.CommandBars("Formatting")
    .Visible = True
    .Position = msoBarTop
End With