Platform SDK: CDO for Windows 2000

TextBodypart Property

The TextBodypart property returns a reference to the BodyPart object that contains the plain text representation of the message.

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

Remarks

You can use the TextBodyPart property to quickly access the BodyPart object that contains the text portion of the message. That is, rather than enumerating the BodyPart hierarchy of the message that is seeking the object with its content type set to text/plain, you can use the TextBodyPart property to return a reference immediately. A similar mechanism is available for the text/html portion of the message using the IMessage.HTMLBody and IMessage.HTMLBodyPart properties.

The content of the BodyPart object referenced by the TextBodyPart property can be updated using the IMessage.TextBody property.

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

See Also

IMessage.TextBody

IMessage.AutoGenerateTextBody

IMessage.HTMLBody

IMessage.HTMLBodyPart