Share via


Choosing a Form's Property Set

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

When you implement your form server, you need to have a property for each piece of information that your message class needs. These properties can be predefined MAPI properties, or they can be custom properties that you define. For more information about working with properties, see MAPI Property Overview.

Your form configuration file will contain a list of properties that your form server exposes for client applications to use, but this does not have to be the entire list of properties used by your form server. Client applications typically use the exposed properties to enable users to sort messages in a folder or customize their interfaces in some way.

MAPI has a large set of predefined properties that suffice for most applications. However, there will be times when a custom message class needs a property that MAPI does not define. You can use custom properties to extend the MAPI predefined set of properties for whatever special information your form server needs to support.

You can use either of the following ways to define custom properties:

  • Choose a name for the property and use the IMAPIProp::GetIDsFromNames method to obtain a property tag for it. The IMAPIProp interface through which you call this method comes from the IMessage pointer that is passed to the form server when the message is created. Note that the property name must be a wide-character string.

  • Define a custom property tag yourself. Custom property tags must be in the range 0x6800 through 0x7BFF. Properties in this range are message-class specific.

For more information about defining custom properties, see Defining New MAPI Properties.

NoteNote

Form servers that have a message text often use the PR_RTF_COMPRESSED (PidTagRtfCompressed) property to store it. If your form server uses PR_RTF_COMPRESSED, it should also ensure that the PR_BODY (PidTagBody) property contains a text-only version of the message text, in case the resulting message is read by a client that does not support Rich Text Format (RTF) message text.

See Also

Concepts

Developing MAPI Form Servers