OutlookBarPane.Contents property (Outlook)

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


expression. Contents

expression A variable that represents an OutlookBarPane object.


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

OutlookBarPane 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.