How to: Activate a mail app in Outlook for a specific message class

apps for Office

Learn how to identify the message class of an item in Outlook and activate a mail app based on the message class of the currently viewed item.

Last modified: April 01, 2014

Applies to: Exchange Online | Exchange Server 2013 | Exchange Server 2013 SP1 | Outlook 2013 | Outlook 2013 RT | Outlook 2013 SP1 | Outlook Web App | OWA for Devices

In this article
What is a message class
Activating mail apps based on the message class
Additional resources

   Office.js: v1.0, v1.1

   Apps for Office manifests schema: v1.0, v1.1

Note Note

"Outlook" in this article refers to the Outlook rich client, Outlook RT, Outlook Web App, and OWA for Devices.

Each item in Outlook is associated with a message class. One primary purpose of the message class is to identify the form that Outlook should use to display the item. For example, an email message has the message class IPM.Note. Outlook uses the Message form to display an item with this message class.

Outlook supports customizing standard forms. For example, you can add a page to the standard Appointment form to display the business address of the contact in an online map. This custom Contact form has a custom message class. The name of the custom message class extends the Appointment message class IPM.Appointment (for example, IPM.Appointment.MyForm). The Outlook form designer and the Outlook COM-based object model support customizing a standard form and creating a custom message class based on the corresponding built-in message class.

You can design a mail app to be activated when the user is viewing an item of a specific message class. Note that this does not apply when the user is composing an item.

A service that works with items of a specific message class can enhance its functionality by implementing a mail app that activates based on a specific message class. The supported message classes are the built-in message classes for messages (IPM.Note) and appointments (IPM.Appointment), and any custom message classes inheriting from IPM.Note or IPM.Appointment.

For example, an online tutoring service can schedule lesson times as Outlook appointments for subscribers. These appointments inherit from the IPM.Appointment built-in message class, and can have a custom message class such as IPM.Appointment.Contoso. Without using a mail app, every time when an appointment occurs, the online tutoring service would require a subscriber to go to their website to view the lesson. To better integrate the customer experience, the service can create a Contoso Appointment mail app that activates only when the user is viewing an appointment that has that custom message class. After a subscriber installs the Contoso Appointment mail app in Outlook, whenever the subscriber views one of these Contoso appointments, the ItemIs rule verifies that the appointment message class (IPM.Appointment.Contoso) is equal to the specified ItemClass attribute, and the mail app activates. The user chooses the app in the app bar, the app opens a viewer for the online lesson in the app pane, and the subscriber can start the lesson without leaving Outlook.

The key to identifying the message class of an item and activating the mail app lies in an activation rule of the ItemIs type. The ItemIs activation rule has a required ItemType attribute in which you specify a supported type of item, and an optional ItemClass attribute in which you specify the message class or custom message class for which you would like the mail app to activate. You should set the required FormType attribute to the Read type of form that the mail app activates in. There is one more attribute which is optional, IncludeSubClasses, in which you can specify that the app should activate for all message classes that inherit the message class specified in the ItemClass attribute. The following table lists the supported values for ItemType and the corresponding ItemClass message classes.

Note Note

For mail apps that use schema v1.0, ItemIs rules evaluate to true for only read forms, and, if the selected item is of the specified type or class. The FormType attribute is not defined in schema v1.0, and you don't have to include the FormType attribute in ItemIs rules based on schema v1.0.






Includes email messages, meeting requests, responses, and cancellations. The following are the corresponding message classes:







The following XML code shows an example of an activation rule that activates a mail app if the user is viewing an appointment that has the custom message class IPM.Appointment.Contoso.

<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" ItemClass="IPM.Appointment.Contoso"/>

The following activation rule example activates a mail app if the user is viewing an appointment that has the custom message class IPM.Appointment.Contoso, or any other message class that starts with IPM.Appointment.Contoso, such as IPM.Appointment.Contoso.Lab and IPM.Appointment.Contoso.Exam.

<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" ItemClass="IPM.Appointment.Contoso" IncludeSubClasses="true" />
© 2014 Microsoft