33.3. Creating an Application Add-In

This section walks through the creation of an add-in to Microsoft Outlook 2007. This will demonstrate how to create an application-level add-in that includes a custom Outlook form region for a Contact item.

Never develop Outlook add-ins using your production e-mail account! There's too much risk that you will accidently do something that you will regret later, such as accidently deleting all of the e-mail in your Inbox. With Outlook you can create a separate mail profile; one for your normal mailbox, and one for your test mailbox.

33.3.1. Some Outlook Concepts

Before creating an Outlook add-in, it is worth understanding some basic concepts that are specific to Outlook development. Though there is a reasonable degree of overlap, Outlook has always had a slightly different programming model from the rest of the products in the Office suite.

The Outlook object model is a heavily collection-based API. The Application class is the highest-level class and represents the Outlook application. This can be directly accessed from code as a property of the add-in; this.Application in C# or Me.Application in Visual Basic. With the Application class you can access classes that represent the Explorer and Inspector windows.

An Explorer window in Outlook is the main window that is displayed when Outlook is first opened and displays the contents of a folder, such as the Inbox or Calendar. Figure 33-7 (left) shows the Calendar in the Explorer window. The Explorer ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.