Text Property (Message Object)

Text Property (Message Object)

The Text property returns or sets the text of the message as a string. Read/write.

Syntax

objMessage.Text

Data Type

String

Remarks

The message text is the principal content of an interpersonal message, typically displayed to each recipient as an immediate result of opening the message. Text specifically excludes various other message properties such as Subject, Attachments, and Recipients.

The Text property is a plain text representation of the message text and does not support formatted text.

The maximum size of the text can be limited by the tool that you use to manipulate string variables (such as Microsoft® Visual Basic®).

The Text property corresponds to the MAPI property PR_BODY. 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_BODY.

Example

This code fragment sets the text of a message:

Dim objMessage As Message ' assume valid message
objMessage.Text = "Thank you for arranging the meeting."
 

See Also

Concepts

Message Object