Customizing Outlook user interface (UI)
with advanced form regions. VB.NET, C#

Add-in Express™ Extensions
for Microsoft® Outlook®

Add-in Express Home >

Customizing Outlook UI with .NET forms

At first glance, the Add-in Express Extensions for Outlook seems very easy-to-use. It is true if you embed a custom form into just one region and bind it to just one Outlook folder. However, you may face some difficulties if your project contains several embedded forms, if forms are dynamically bound to Outlook folders, if two or more forms are bound to one folder, etc. This page was created to give you the insight of the Advanced Outlook Regions provided by the Add-in Express Extensions for Outlook. Before we start, you may want to have a look at the video showing how to customize Outlook e-mail forms, contacts, appointments.

Outlook Forms Manager from Add-in Express Extensions for Outlook

The Add-in Express Extensions for Outlook adds a new command to the add-in module commands, "Add Outlook Forms Manager". The command enables the Extensions for Outlook for the current add-in solution, includes all references necessary to support the Add-in Express Extensions for Outlook by the current add-in setup project, and adds a special component, ADXOlFormsManager to the add-in module. Please note that you should run this command before adding embedded forms.

Outlook Forms Manager

The Extensions for Outlook publishes two components used for embedding your custom forms into Outlook. The most important component of the Extensions is the Outlook Forms Manager, an instance of the ADXOlFormsManager class added by the "Add Outlook Forms Manager" command.

The Outlook Forms Manager controls your forms and binds them to Outlook folders. The table below shows some properties and events of the ADXOlFormsManager component. It is a member of the AddinExpress.OL.2005 (2003) namespace.

Property, event or method

Description

Items collection

An item of the collection binds a given form to one or several Outlook folders. The form is specified by the FormClassName property of the item, the folders are specified by three special properties, FolderName, FoldersNames and ExplorerItemTypes that are common for all Outlook-related components provided by Add-in Express.

AddinModule property

Returns a reference to the add-in module that contains the Outlook Forms Manager component.

CurrentForm property

Returns an instance of your form contained in the active Explorer window.

OutlookAppObj property

Returns an instance of the Outlook.Application object that hosts your add-in.

ADXBeforeFolderSwitch event

Occurs before the Outlook 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 folder view.

ADXBeforeFolderSwitchEx event

Occurs before the Outlook Explorer window goes to a new folder, either as a result of a user action or through the program code. Allows you to temporary disable the creation of your form in a folder view or web view region.

ADX Outlook Form

The Add-in Express Extensions for Outlook provides a special form class used for embedding forms into Outlook Explorer and Inspector windows. You can add a new descendant of this class via a special wizard, ADX Outlook Form, available through the Add New Item dialog of the add-in project. Please note that you can run the wizard only after running the "Add Outlook Forms Manager" command.

ADX Outlook Form

The ADXOlForm class is a descendant of Windows.Forms.Form. ADXOlForm publishes several Outlook-specific properties and events used for accessing Outlook objects from a custom Outlook embeddable form. The table below describes some properties and events of ADXOlForm. ADXOlForm is a member of the AddinExpress.OL.2005 (2003) namespace.

Property, event or method

Description

OutlookAppObj property

Returns a reference to the instance of Outlook.Application that hosts the add-in.

ExplorerObj property

Returns a reference to the instance of the Outlook.Explorer object which your form was embedded into. Returns NULL for Advanced Form Regions.

InspectorObj property

Returns a reference to the instance of the Outlook.Inspector object which your form was embedded into. Returns NULL for folder view regions.

FolderObj property

Returns a reference to the instance of Outlook.MAPIFolder in the context of which the form was created. Returns NULL for Advanced Form Regions.

FolderItemsObj property

Returns a reference to the Items collection of the FolderObj property. Returns NULL for Advanced Form Regions.

ADXBeforeFormShow event

Occurs each time before the form is shown.

ADXAfterFormShow event

Occurs each time after the form is shown.

ADXBeforeInspectorSubpaneClose event

Occurs each time before its owner is closed.

ADXSelectionChange event

Retranslates the SelectionChange event of Outlook for folder regions.

FormsManager property

Returns a reference to the Outlook Forms Manager of the add-in.

The Item property

Returns the item of the Items collection of the Outlook Forms Manager that owns the form.