BodyPart Property

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

IMessage Interface

IWorkflowMessage Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property BodyPart As IBodyPart

[C++]HRESULT get_BodyPart(IBodyPart** pVal);

Parameters

Remarks

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.

Examples

[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

[C++]

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

*/ #ifndef _CORE_EXAMPLE_HEADERS_INCLUDED #define _CORE_EXAMPLE_HEADERS_INCLUDED #import <msado15.dll> no_namespace #import <cdoex.dll> no_namespace #include <iostream.h> #endif

void IMessage_BodyPart_Example() {

/* ** When using C++, avoid the interface ** properties and access the object's ** interface directly. / IBodyPart pBp = NULL; HRESULT hr = CoCreateInstance( __uuidof(Message), NULL, CLSCTX_SERVER, __uuidof(IBodyPart), (void**)&pBp);

// ...

pBp->Release();

}

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.