Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

BodyPart Property

Exchange Server 2003

BodyPart 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 IBodyPart interface on this object. This property is read-only.

Applies To

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In



        [Visual Basic]Property BodyPart As IBodyPart
        [C++]HRESULT get_BodyPart(IBodyPart** pVal);


Returned reference to an IBodyPart Interface.


This property returns the IBodyPart interface on the object, and acts as shorthand in place of standard interface navigation such as QueryInterface or the IMessage.GetInterface method used by scripting languages.


        [Visual Basic]

Dim iMsg As New CDO.Message
Dim iBp As CDO.IBodyPart ' for IBodyPart on message

   'Get IBodyPart using BodyPart property
Set iBp = iMsg.BodyPart

Set iBp = Nothing ' Release
   ' Get IBodyPart using QI
Set iBp = iMsg

Set iBp = Nothing ' Release


 You must have the following paths in your
 INCLUDE path.
 %CommonProgramFiles%\microsoft shared\cdo

#import <msado15.dll> no_namespace
#import <cdoex.dll> no_namespace
#include <iostream.h>

void IMessage_BodyPart_Example() {

   ** When using C++, avoid the interface
   ** properties and access the object's
   ** interface directly.
   IBodyPart*   pBp   =   NULL;
   HRESULT hr = CoCreateInstance(

   // ...


© 2015 Microsoft