Platform SDK: CDO for Windows 2000

HTMLBodyPart Property

The HTMLBodyPart property is an IBodyPart object reference on the BodyPart object that contains the Hypertext Markup Language (HTML) representation of the message.

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

Remarks

The HTMLBodyPart property can be used to quickly access the IBodyPart object reference to the BodyPart object that contains the HTML representation of the message (if any). Rather than enumerating the BodyPart hierarchy of the message that is seeking the object with its content type set to text/html, you can use the HTMLBodyPart property to return a reference immediately. A similar mechanism is available to you for the text/plain portion of the message (if any) by using the IMessage.TextBody and IMessage.TextBodyPart properties.

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

An error is returned if the HTML body part does not exist.

See Also

IMessage.HTMLBody

IMessage.AutoGenerateTextBody

IMessage.TextBody

IMessage.TextBodyPart