Platform SDK: Exchange 2000 Server

Parent Property

[This is preliminary documentation and subject to change.]

Returns the parent body part object.

[Visual Basic]
Property Parent as IBodyPart
[C++]
HRESULT get_Parent(IBodyPart** pVal);
[IDL]
HRESULT [propget] Parent( [out,retval] IBodyPart** pVal);

Remarks

Message content that is more than plain US-ASCII only 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 above, the Parent object may or may not be an instance of the BodyPart COM class.

Example

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
' we now have the IBodyPart interface on the Message object, as it
' is the parent of the attachment BodyPart object.