Platform SDK: Exchange 2000 Server

Delete Method

[This is preliminary documentation and subject to change.]

Removes the specified BodyPart object from the collection.

[Visual Basic]
Sub Delete(Item as Variant)
[C++]
HRESULT Delete( VARIANT Item);
[IDL]
HRESULT Delete([in] VARIANT Item );
Item
Either the ordinal index or the IBodyPart interface on the object within the collection to remove.

Remarks

You can delete the object by specifying its position in the collection, or by passing the IBodyPart interface to the Delete method.

Example

Dim iMsg as New CDO.Message
Dim iBp as IBodyPart
Dim iBps as IBodyParts
Set iBps = iMsg.BodyPart.BodyParts
Set iBp = iBps.Add
... '  add more body parts
iBps.Delete iBp  ' delete this specific object
iBps.Delete 2    ' delete object # 2