Search code examples
vbapowerpointribbon

Powerpoint VBA to maximize the ribbon


Does someone know the Powerpoint VBA syntax for maximizing (show tabs and commands) and intermediate-sizing (Show tabs only) the powerpoint ribbon?

The following works for minimizing the ribbon, but I can't find anything to bring the ribbon back to its normal size.

Thank you

' minimize the ribbon    
CommandBars.ExecuteMso "MinimizeRibbon"
    
' show tabs only on the ribbon?
xxx?
    
' maximize the ribbon (show tabs and commands)?
xxx?
    
     

Solution

  • CommandBars.ExecuteMso "MinimizeRibbon"
    

    is a toggle, so to maximise you just run it again. When minimized, the tabs still display. To hide them completely:

    Sub HideRibbon()
        CommandBars.ExecuteMso "HideRibbon"
    End Sub