Platform SDK: Exchange 2000 Server

TextBodypart Property

[This is preliminary documentation and subject to change.]

Returns a body part object containing the text content of this message.

[Visual Basic]
Property TextBodypart as IBodyPart
read-only
[C++]
HRESULT get_TextBodyPart(IBodyPart** pVal);
[IDL]
HRESULT [propget] TextBodypart([out,retval] IBodyPart** pVal);

Remarks

The TextBodyPart property can be used to quickly access the IBodyPart object reference to the BodyPart object that contains the text portion of the message (if any). That is, rather than having to enumeration the BodyPart hierarchy of the message seeking the object with Content-Type set to "text/plain" you can use the TextBodyPart to return a reference immediately. A similar mechanism is available for the text/html portion of the message (if any) using the IMessage.HTMLBody and IMessage.HTMLBodyPart properties.

The content of the BodyPart object referenced by TextBodyPart can be updated using the IMessage.TextBody property. The TextBody property can only be used to update the contents, not the mail headers themselves.

If the requested body part does not exist, the method returns an error.

See Also

IMessage.TextBody

IMessage.AutoGenerateTextBody

IMessage.HTMLBody

IMessage.HTMLBodyPart