Size Property (Message Object)

Size Property (Message Object)

The Size property returns the approximate size in bytes of the message. Read-only.

Syntax

objMessage.Size

Data Type

Long

Remarks

The Size property contains the sum, in bytes, of the sizes of all properties on this Message object, including in particular the Attachments property. It can be considerably greater than the size of the Text property alone.

The Size property is computed by the message store and is not valid until after the first Update or Send operation. Note that not all message stores support this property.

The Size property is not exposed on AppointmentItem objects created by Microsoft® Schedule+, and it is not automatically set when you create an appointment within a CDO application until you call the Update method. In these cases, the application must assign a value to Size or an attempt to read it returns CdoE_NOT_FOUND.

The Size property corresponds to the MAPI property PR_MESSAGE_SIZE. 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_SIZE.

See Also

Concepts

Message Object