Partager via


OutlookBarPane.Contents Property (Outlook)

Returns the OutlookBarStorage object for the specified Outlook Bar pane. Read-only.

Syntax

expression .Contents

expression A variable that represents an OutlookBarPane object.

Example

This Microsoft Visual Basic for Applications example displays a message listing the groups in the Outlook Bar.

Sub ListGroups() 
 
 Dim myOlBar As Outlook.OutlookBarPane 
 
 Dim myOlGroups As Outlook.OutlookBarGroups 
 
 
 
 myMsg = "The groups in the Outlook Bar are:" 
 
 Set myOlBar = Application.ActiveExplorer.Panes.Item("OutlookBar") 
 
 Set myOlGroups = myOlBar.Contents.Groups 
 
 For x = 1 To myOlGroups.Count 
 
 myMsg = myMsg & Chr(13) & myOlGroups.Item(x) 
 
 Next x 
 
 MsgBox myMsg 
 
End Sub

See Also

Concepts

OutlookBarPane Object Members

OutlookBarPane Object