Panes Property

Microsoft Outlook Visual Basic

Panes Property

       

Returns a Panes collection object representing the panes displayed by the specified explorer.

expression.Panes

expression   Required. An expression that returns an Explorer object.

Example

This Microsoft Visual Basic/Visual Basic for Applications example adds a group named Marketing as the second group in the Outlook Bar.

Dim myOlApp As New Outlook.Application
Dim myolBar As Outlook.OutlookBarPane
Set myolBar = myOlApp.ActiveExplorer.Panes.Item("OutlookBar")
myolBar.Contents.Groups.Add "Marketing", 2

If you use VBScript, you do not create the Application object. This example shows how to perform the same task using VBScript.

Set myolBar = Application.ActiveExplorer.Panes.Item("OutlookBar")
myolBar.Contents.Groups.Add "Marketing", 2