Partager via


Item Property (IBodyParts)

Topic Last Modified: 2006-06-13

Returns the BodyPart object specified by the index. This property is read-only.

Applies To

IBodyParts Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

Property Item(Index As Long) As IBodyPart
HRESULT get_Item(long Index, IBodyPart** pVal);

Parameters

  • Index
    Returns the value of the collection index as a reference to a long.

Remarks

Item is the default member on the interface.

Example

Sub ProcessBodyParts( iBp as CDO.IBodyPart )
  Dim Count as Long

  ' Process body part code here

  ' Recursively descend body part hierarchy
  Dim iBp_local as CDO.IBodyPart
  Count = iBp.Count
  If Count > 1 Then
    Dim iBps as CDO.IBodyParts
    Set iBps = iBp.BodyParts
    For I = 1 to Count

      ' Item is the default.
      ' It is unnecessary to type ".Item". 
      Set iBp_local = iBps.Item(I)
      ProcessBodyPart iBp_local
    Next I
  End If
End Sub