Share via


Count Property (IBodyParts)

Topic Last Modified: 2006-06-13

Returns the number of BodyPart objects in the collection. This property is read-only.

Applies To

IBodyParts Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

Property Count As Long
HRESULT get_Count(long* pVal);

Parameters

  • pVal
    Returns the value of the Count property as a reference to a long.

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
      Set iBp_local = iBps(I)
      ProcessBodyPart iBp_local
    Next I
  End If
End Sub