Dmitry Kostochko

HowTo: Customize Outlook Navigation Pane – C#, VB.NET

What is the Outlook Navigation pane? According to Microsoft, it is the column on the left side of the Outlook window that includes panes such as Shortcuts or Mail and the shortcuts or folders within each pane. The Navigation Pane was introduced in Outlook 2003 and enhanced in Outlook 2007. Let’s see what a developer can do with the Navigation Pane.

Well, in Outlook 2003 the only thing that the developer can do is to switch the Outlook Navigation Pane on and off. Agree, it’s barely sufficient, but that’s the whole of the Outlook 2003 Object model capabilities available for the developer:

Private Sub ButtonVisible_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles ButtonVisible.Click
    If TryCast(ExplorerObj, Outlook._Explorer). _
    IsPaneVisible(Outlook.OlPane.olNavigationPane) Then
        TryCast(ExplorerObj, Outlook._Explorer).ShowPane( _
        Outlook.OlPane.olNavigationPane, False)
        ButtonVisible.Text = "Navigation Pane On"
        TryCast(ExplorerObj, Outlook._Explorer).ShowPane( _
        Outlook.OlPane.olNavigationPane, True)
        ButtonVisible.Text = "Navigation Pane Off"
    End If
End Sub

In this respect, the Object Models of Outlook 2007 and Outlook 2010 offer far more features. Besides the ability to minimize the Navigation pane programmatically, we can switch between navigation modules using the CurrentModule property, manage the folder list in Favorite Folders, create your own groups in all navigation modules except for MailModule module, populate custom NavigationGroup using the NavigationFolders collection.

I am not going to publish the whole code right here, you can download the C# sample and VB.NET sample using the links below. As to the notorious question “How to add a custom button to the bottom of the Navigation Pane?”, the answer is the same as before – there is no way to do it. Even the Outlook 2007 Object Model doesn’t allow this. Probably something will change in the next Microsoft Office version, let’s wait and hope :)

You may also be interested in:

Outlook customization: Reading pane, Outlook bar and To-Do bar
Special features for Outlook plug-in development

Available downloads:

C# sample Outlook add-in for VS 2005
VB.NET sample Outlook add-in for VS 2005

Post a comment

Have any questions? Ask us right now!