Class NavigationPane (Outlook VBA)

The class NavigationPane represents the navigation pane displayed by the active Explorer object. To use a NavigationPane class variable it first needs to be instantiated, for example


Dim npe as NavigationPane
Set npe = ActiveExplorer.NavigationPane

Class

Returns an OlObjectClass constant indicating the object's class. Here you can find possible values for OlObjectClass.

This property returns olNavigationPane for the NavigationPane object.


Dim oocsClass As OlObjectClass
oocsClass = ActiveExplorer.NavigationPane.Class

CurrentModule

Returns or sets a NavigationModule object that represents the currently selected navigation module in the navigation pane.


ActiveExplorer.NavigationPane.CurrentModule =

DisplayedModuleCount

Returns or sets a Long value that indicates the number of NavigationModule objects displayed in the navigation pane.

This property can only be set to a value between 0 and the value of the Count property for the Modules collection of the NavigationPane object. If this property is set to a value greater than the maximum allowable value, the property value is automatically set to the maximum allowable value. An error occurs if this property is set to less than 0. If the IsCollapsed property of the NavigationPane object is set to False, then this property value represents the number of navigation modules for which both icon and name are displayed in the navigation pane. If IsCollapsed is set to True, then the DisplayedModuleCount property value represents the number of navigation modules for which an icon is displayed in the navigation pane. Setting the value of this property resizes the Modules section of the navigation pane to display more or fewer NavigationModule objects as needed.


Sub DisplayAllModules() 
 
 Dim objPane As NavigationPane 
 
 
 
 ' Get the NavigationPane object for the 
 
 ' currently displayed Explorer object. 
 
 Set objPane = Application.ActiveExplorer.NavigationPane 
 
 
 
 ' Set the DisplayedModuleCount property to 
 
 ' display all modules contained by the 
 
 ' Navigation Pane. 
 
 objPane.DisplayedModuleCount = objPane.Modules.Count 
 
End Sub

IsCollapsed

Returns or sets a Boolean value that determines whether the navigation pane is collapsed.


ActiveExplorer.NavigationPane.IsCollapsed = True

Modules

Returns a NavigationModules object that represents the set of navigation modules contained by the navigation pane.


Dim nmsModules As NavigationModules
Set nmsModules = ActiveExplorer.NavigationPane.Modules

Session

Returns the NameSpace object for the current session.

The Session property and the GetNamespace method can be used interchangeably to obtain the NameSpace object for the current session. Both members serve the same purpose. For example, the following statements perform the same function: