共用方式為


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

Concepts

OutlookBarGroup Object Members

OutlookBarGroup Object