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.
Microsoft CDO for Exchange 2000 Library
DLL Implemented In
[Visual Basic]Property TextBody As String
[C++]HRESULT get_TextBody(BSTR* pVal);
HRESULT put_TextBody(BSTR Val);
- Returns the value of the TextBody property as a reference to a BSTR.
- Sets the value of the TextBody property to the value of the BSTR.
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.
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.