Parent Property

Parent 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.

Returns the parent body part object. This property is read-only.

Applies To

IBodyPart Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property Parent As IBodyPart

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

Parameters

Remarks

Message content that is more than plain US-ASCII is arranged in a parent-child hierarchy. You can use the Parent property to navigate up from the current object to the object one level higher. If the object has no parent, as in the case with the Message object, an exception is raised.

As noted earlier, the Parent object may or may not be an instance of the BodyPart Component Object Model (COM) class.

Example

[Visual Basic]

Dim iMsg As New CDO.Message Dim iBp1 As CDO.IBodyPart Dim iBp2 As CDO.IBodyPart

Set iBp1 = iMsg.AddAttachment("c:\files\file.doc") Set iBp2 = iBp1.Parent

' The IBodyPart interface is now on the Message object, as it ' is the parent of the attachment BodyPart object.

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.