Platform SDK: CDO 1.2.1

ID Property (Field Object)

The ID property returns the MAPI tag for the Field object as a long integer. Read-only.

Syntax

objField.ID

Data Type

Long

Remarks

The Field object's ID property is unique among identifier properties supported in CDO. The Field object identifier is a long integer that corresponds to a MAPI property tag value. All other ID properties are hexadecimal strings corresponding to the MAPI PR_ENTRYID property.

A MAPI property tag is a 32-bit unsigned integer. Its high-order 16 bits contain the MAPI property identifier, and its low-order 16 bits contain the MAPI property type. For more information, see "About Property Tags" in the MAPI Programmer's Reference.

Note  The MAPI property type is not the same as the CDO Type property. There is a correspondence between the two entities, but their value sets are not the same. The Field object's ID property contains the MAPI property type; its Type property contains the Visual Basic® data type used by CDO.

Example

' The Field.ID property is a long value, not a string 
' fragment from the function Field_ID() 
'   verify that objOneField is valid, then access 
    MsgBox "MAPI ID in high-order word, MAPI type in low-order: &H" _ 
           & Hex(objOneField.ID)