Platform SDK: CDO for Windows 2000

Fields Property

The Fields property specifies the Fields collection for the object.

[Visual Basic]
Property Fields as ADODB.Fields
read-only
[C++]
HRESULT get_Fields(Fields** pVal);
[IDL]
HRESULT [propget] Fields([out,retval] Fields** pVal);

Remarks

The Fields property obtains a collection of Microsoft® ActiveX® Data Objects (ADO) Field objects, each of which contains a field relating to the message.

Example

This example code determines how many fields a message has:

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Windows 2000 Library
Dim iMsg as New CDO.Message 
Dim collFields as Fields 
Set collFields = iMsg.Fields

If collFields.Count = 0 Then 
  MsgBox "Fields collection is empty" 
Else 
  MsgBox "Message has " & collFields.Count & " fields" 
End If