Type Property (Message Object)

Type Property (Message Object)

The Type property returns or sets the MAPI message class for the message. Read/write.

Syntax

objMessage.Type

Data Type

String

Remarks

The Type property contains the MAPI message class, which determines the set of properties defined for the message, the kind of information it conveys, and how it is to be handled. The message class consists of ASCII strings concatenated with periods, each string representing a level of subclassing. A standard interpersonal message has message class IPM.Note, which is a subclass of IPM and a superclass of IPM.Note.Private.

The subclasses of the Message object are distinguished by the value of their Type property. An AppointmentItem object has a Type of IPM.Appointment, and a MeetingItem object has a Type of IPM.Schedule.Meeting.Request.

A Message object normally has a Type of IPM.Note, but CDO changes it to IPM.Post if you post the message in a public folder.

For more information about MAPI message classes, see the MAPI Programmers Reference.

CDO does not impose any restrictions on this value except that it be a valid string value. You can set the value to any string that is meaningful for your application. By default, CDO sets the Type value of new messages to the MAPI message class IPM.Note.

AppointmentItem objects in a Microsoft® Schedule+ calendar folder do not have the full set of attributes of a general message. If you obtain the default calendar folder by passing CdoDefaultFolderCalendar to the Session object's GetDefaultFolder method, its appointments have no defined value for the Type property. An attempt to access Type in this case returns CdoE_NOT_FOUND.

The Type property corresponds to the MAPI property PR_MESSAGE_CLASS. It can be rendered into HTML hypertext using the CDO Rendering ObjectRenderer object. To specify this, set the object renderer's DataSource property to this Message object and the property parameter of the RenderProperty method to CdoPR_MESSAGE_CLASS.

See Also

Concepts

Message Object