Pieter van der Westhuizen

Creating custom Outlook forms in C#, VB.NET: Outlook 2013 and 2010 form examples

If you’ve read through our website content, you would probably have read that Outlook is one of the most featured Microsoft Office applications supported by Add-in Express. Microsoft Outlook is also one of the most popular desktop e-mail clients, so it makes sense as a developer to leverage that popularity and to extend Outlook with your own functionality.

Part of the allure of customizing or even adding your entire application inside Outlook is the ability to add your own .Net forms inside the Outlook Explorer and Inspector windows. In this article I’ll show you how easy it is to design and create your own custom Outlook 2013 and Outlook 2010 forms using Add-in Express for Office and .net.

Creating custom Outlook Inspector forms

Add-in Express provides an ADX Outlook Form item template in Visual Studio (C#, VB.NET are supported); you can design this form as you would any Windows form.

Add-in Express Outlook Form template in Visual Studio 2012

Before you can use the Add-in Express Outlook Form regions, you need to add a Forms Manager component to your AddinModule designer surface.

Adding the Forms Manager component to the AddinModule designer surface

The Forms Manager’s Items property is a collection of all the Form regions in your Outlook extension. Add-in Express provides an integrated visual designer to make adding custom form regions to the Forms Manager very easy.

The integrated visual designer to add Outlook form regions

You have a wide array of options to customize how your Outlook forms should behave and look. For example, you can specify whether your Outlook form should only be visible for Outlook Mail items or only for mail items in a specified folder.

An array of options to customize the behavior and look of your Outlook forms

In this example I’ve chosen to show my custom Outlook form on the right-hand side (RightSubpane) of any Outlook mail items. I’ve also specified that the form should be visible when I’m reading or composing a new e-mail.

Sample Outlook form adding a customer history screen to the e-mail:

A custom Outlook form on the right-hand side of an Outlook mail item

By setting the IsDragDropAllowed property to true and specifying which areas the user can drag the custom Outlook form to, you can give your users the option to choose where the Outlook form should be docked in the Inspector window.

Enabling drag-and-drop for the custom Outlook form

Add-in Express will automatically provide the user with visual cues as to where they can drop the form.

Visual cues show all available locations for the Outlook custom form:

Visual cues show the user all available locations for the custom Outlook form

Creating custom Outlook Explorer forms (views)

Adding your own form to the Outlook Explorer is just as easy as adding it to the Inspector windows using Add-in Express. You first need to add another ADX Outlook form to your project, or you can also reuse any ADX Outlook Form that is already in your project.

I’ve created another form, and added it in the same manner as I’ve done with the Inspector form to the Forms Manager. I’ve enabled drag and drop and set it to dock to the right of the Outlook Explorer window. The ExplorerAllowedDropRegions property is used to specify where the user can drag the custom Outlook form to; in this example I’ve selected all possible positions.

In the Outlook Explorer your custom form should look like the following:

A custom form in Outlook Explorer

As with the Inspector form, when the user drags your custom Outlook form in Explorer, Add-in Express will display a visual indication of all the available positions the user can dock the form.

A visual indication of all the available positions the user can dock the form

After the user drops the form in another location (in this sample in the bottom sub pane) the Outlook custom form will automatically resize to fit into the new location.

An Outlook custom form automatically resizes to fit into the new location

Examples of custom Outlook forms

Let’s take a quick look at some more examples of how you can dock your form in Outlook 2010 and 2013 using Add-in Express.

Outlook 2010 forms examples

A custom form on the left sub pane in Outlook 2010:

A custom form on the left sub pane in Outlook 2010

A custom form on the right of the Reading pane in Outlook 2010:

A custom form on the right of the Reading pane in Outlook 2010

A custom form docked to the right side in Outlook 2010:

A custom form docked to the right side in Outlook 2010

A custom form at the bottom of the Navigation Pane in Outlook 2010:

A custom form at the bottom of the Navigation Pane in Outlook 2010

A custom form at the bottom of the To-do bar in Outlook 2010:

A custom form at the bottom of the To-do bar in Outlook 2010

Outlook 2013 forms examples

A custom form on the left sub pane in Outlook 2013:

A custom form on the left sub pane in Outlook 2013

A custom form on the right of the Reading pane in Outlook 2013:

A custom form on the right of the Reading pane in Outlook 2013

A custom form docked to the right side in Outlook 2013:

A custom form docked to the right side in Outlook 2013

A custom form at the bottom of the Navigation Pane in Outlook 2013:

A custom form at the bottom of the Navigation Pane in Outlook 2013

I hope this article gave you a better understanding of how Add-in Express can help you create your own Outlook 2010 forms.

Thank you for reading. Until next time, keep coding!

You may also be interested in:

2 Comments

  • Alex van Amersfoort says:

    Hello,

    I am trying to create a custom Outlook Contact form without any code in the form itself…or without the use of ADX because in this case I only want to install our own .dll or ocx.
    Is it possible to create a custom User Control and add that to the Outlook Forms Designer Toolbox, so you can place it directly on the custom form…and let all the actions be done with the user control? (I have done this before with VB6/Office2010)

    Regards,

    Alex

  • Dmitry Kostochko (Add-in Express Team) says:

    Hi Alex,

    As far as I understand, you are trying to develop an ActiveX control and embed it to the Outlook’s Contact form, correct? If yes, sorry, but ActiveX controls are beyond our area of specialization and therefore I cannot suggest anything to help you.

Post a comment

Have any questions? Ask us right now!