Export (0) Print
Expand All

TextBody Property

Exchange Server 2003

TextBody Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The plain text representation of the body of this message.

Applies To

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

        [Visual Basic]Property TextBody As String
        [C++]HRESULT get_TextBody(BSTRpVal);
HRESULT put_TextBody(BSTR Val);

Parameters

pVal
Returns the value of the TextBody property as a reference to a BSTR.
Val
Sets the value of the TextBody property to the value of the BSTR.

Remarks

This property is also available as the textdescription Field in the schema.

To construct a Multipurpose Internet Mail Extensions (MIME) message containing both the plain text and HTML versions of the body, you can set the message's IBodyPart ContentMediaType Property to "multipart/alternative", the first body part's ContentMediaType Property to "text/plain", and the second body part's ContentMediaType Property to "text/richtext" or "text/html". Alternatively, you can use the IMessage AutoGenerateTextBody Property and the IMessage MimeFormatted Property to automate some of this process. When these properties are both True and you set HTMLBody Property, Collaboration Data Objects (CDO) automatically sets the TextBody property to the plain text equivalent.

To access the corresponding HTML text string, use the IMessage HTMLBody Property. To retrieve the body part object that contains the HTML part of the message, use the IMessage HTMLBodyPart Property.

The plain text is also available as a body part object through the IMessage TextBodyPart Property.

The TextBody property returns an empty string if it has never been set. If you need to determine whether this is the case or whether the plain text is present but currently an empty string, use the IMessage TextBodyPart Property to retrieve the body part containing the text portion of the message.

The default value of TextBody is an empty string.

See Also

textdescription Field

TextBodyPart Property

AutoGenerateTextBody Property

Show:
© 2014 Microsoft