Customize Outlook folder pane with WinForms. Create
custom Outlook Explorer folder views in C#, VB.NET.
Add-in Express™ Extensions
for Microsoft® Outlook®
Customizing Outlook folder views (Explorer windows)
With the Add-in Express Extensions you can customize Outlook folder views as well as Outlook forms programmatically by embedding feature-rich .NET forms (WinForms) into all Outlook versions: Outlook 2003, 2002 (XP), 2000 and Outlook 2007. Custom .NET forms can be embedded into one, several or all Outlook views (Explorer windows) and forms (Inspector windows).
Customize Outlook views using Advanced View Regions
In the Microsoft terms, the Outlook folder pane is the area where items (messages, tasks, notes, etc.) of the selected folder are shown. The Extensions allows you to replace the folder pane of the selected folder with your advanced view region.

Also, the Extensions helps you embed your custom form (WinForm) into a view region of a selected Outlook folder, as shown below.


The Extensions supports embedding multiple forms into multiple view regions / panes (top, bottom, left or right). Below you can see a step-by-step instruction on how to embed your custom forms, WinForms, into Outlook view regions (Explorer windows). See also a video showing how to customize views in Outlook Today style.
1. Add the Outlook Forms Manager to the add-in module
The Extensions for Outlook adds to the add-in module commands set a special command, "Add Outlook Forms Manager", available on the command area of the Properties window or by right-clicking the add-in module. To include the Add-in Express Extensions functionality in your add-in project you just run this command. The command adds the Outlook Forms Manager component to the add-in module and makes some changes in the add-in setup project.

The Outlook Forms Manager (ADXOlFormsManager) is very important because it centralizes all your forms and binds them to Outlook folders. The component provides several Outlook-specific properties and events such as:
- AddinModule. Returns a reference to the add-in module that contains the Outlook Forms Manager component.
- The Items collection. Each item of this collection binds one form class to its own Outlook folder set. To embed the form into view regions for every folder view, its class should be specified for one or more items that bind the form's instances to appropriate folders through ExplorerItemTypes, FolderName and FolderNames properties.
- CurrentForm. Returns a reference to the form's instance if it exists in the current region of the current Outlook Explorer window / view. Returns null if no form instances exist in the current Outlook view.
- OutlookAppObj. Returns a reference to the Outlook.Application object that hosts your add-in.
- ADXBeforeFolderSwitch. Occurs before the Explorer window goes to a new folder, either as a result of a user action or through the program code. You can use this event to finish all active processes in the current form embedded into the current Outlook region.
- ADXNewInspector. Occurs whenever a new Outlook inspector window is opened, either as a result of user action or through program code.
2. Create and customize a new Outlook form
The Add-in Express Extensions provides a special template, ADX Outlook Form, used for creating custom forms which are to be embedded into Outlook regions. The ADX Outlook Form template is available via the Add New Item dialog of the add-in project:

On the created form you can use any controls and components including data grids, list views, edit and combo boxes, etc.

In addition to all properties and events of System.Windows.Forms.Form, ADX Outlook Form (the ADXOlForm class) provides several Outlook-specific properties and events such as:
- ExplorerObj. Returns a reference to the current Outlook Explorer object.
- FolderItemsObj. Returns a reference to the Items collection of the current folder.
- FolderObj. Returns a reference to the current folder object.
- OutlookAppObj. Returns a reference to the Outlook.Application object that hosts your add-in.
- FormsManager. Returns a reference to the Outlook Forms Manager component that controls the form.
- Item. Returns a reference to the item of the Items collection of the Outlook Forms Manager component that controls the form.
- ADXBeforeFormShow and ADXAfterFormShow. Occur each time before / after the form is shown.
- ADXSelectionChange. Retranslates the Outlook.SelectionChange event to the form. For example, you can use this event to react to selection changes when the user switches to a different item in a folder using the user interface.
3. Bind your form to Outlook folders
To specify the folders for which your form is displayed, you add a new item to the Items collection of the Outlook Forms Manager, select your form class in the FormClassName property and specify the folder via three special properties: FolderName, FoldersNames and ExplorerItemTypes. These properties are common for all Outlook-related components provided by Add-in Express.
Then, with the ExplorerLayout property you specify the view region that the form is placed on:

4. Run your add-in
Run your add-in and select one of the specified folders:


