OutlookBarGroup.Shortcuts property (Outlook)

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

Syntax

expression. Shortcuts

expression A variable that represents an OutlookBarGroup object.

Example

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

See also

OutlookBarGroup Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.