OutlookBarGroup.Shortcuts Property (Outlook)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns an OutlookBarShortcuts collection of shortcuts contained within the Shortcuts pane. Read-only.

expression .Shortcuts

expression A variable that represents an OutlookBarGroup object.

This Microsoft Visual Basic for Applications (VBA) example deletes all empty groups in the Shortcuts pane.

Sub DeleteEmptyGroups() 
 Dim myOlBar As Outlook.OutlookBarPane 
 Dim myOlGroup As Outlook.OutlookBarGroup 
 Dim x As Integer 
 Set myOlBar = Application.ActiveExplorer.Panes.Item("OutlookBar") 
 For x = myOlBar.Contents.Groups.Count To 1 Step -1 
 Set myOlGroup = myOlBar.Contents.Groups.Item(x) 
 If myOlGroup.Shortcuts.Count = 0 Then 
 myOlBar.Contents.Groups.Remove x 
 End If 
 Next x 
End Sub