Platform SDK: CDO 1.2.1 |
The Class property returns the object class of the object. Read-only.
object.Class
Long
The Class property contains a numeric constant that identifies the CDO Library object. The following values are defined:
CDO Library object | Class value | Type library constant |
---|---|---|
AddressEntries collection | 21 | CdoAddressEntries |
AddressEntry | 8 | CdoAddressEntry |
AddressEntryFilter | 9 | CdoAddressFilter |
AddressList | 7 | CdoAddressList |
AddressLists collection | 20 | CdoAddressLists |
AppointmentItem | 26 | CdoAppointment |
Attachment | 5 | CdoAttachment |
Attachments collection | 18 | CdoAttachments |
Field | 6 | CdoField |
Fields collection | 19 | CdoFields |
Folder | 2 | CdoFolder |
Folders collection | 15 | CdoFolders |
GroupHeader | 25 | CdoGroupHeader |
InfoStore | 1 | CdoInfoStore |
InfoStores collection | 14 | CdoInfoStores |
MeetingItem | 27 | CdoMeetingItem |
Message | 3 | CdoMsg |
MessageFilter | 10 | CdoMessageFilter |
Messages collection | 16 | CdoMessages |
Recipient | 4 | CdoRecipient |
Recipients collection | 17 | CdoRecipients |
RecurrencePattern | 28 | CdoRecurrencePattern |
Session | 0 | CdoSession |
CDO also defines CdoUnknown, with the value –1, for an object implementing the OLE IUnknown interface.
The Class property does not correspond to a MAPI property and cannot be rendered into HTML hypertext by the CDO Rendering Library.
' Function: Util_DecodeObjectClass ' Purpose: Decode the long integer class value, ' show the related object name ' See documentation topic: Class property Function Util_DecodeObjectClass(lClass As Long) ' error handling here ... Select Case (lClass) Case CdoSession: MsgBox ("Session object; Class = " & lClass) Case CdoMsg: MsgBox ("Message object; Class = " & lClass) End Select ' error handling ... End Function ' Function: TestDrv_Util_DecodeObjectClass ' Purpose: Call the utility function DecodeObjectClass for Class values ' See documentation topic: Class property Function TestDrv_Util_DecodeObjectClass() ' error handling here ... If objSession Is Nothing Then MsgBox "Need to set the Session object: Session->Logon" Exit Function End If ' expect type CdoSession = 0 for Session object Util_DecodeObjectClass (objSession.Class) Set objMessages = objSession.Inbox.Messages Set objOneMsg = objMessages.GetFirst If objOneMsg Is Nothing Then MsgBox "Inbox is empty" Exit Function End If ' expect type CdoMessage = 3 for Message object Util_DecodeObjectClass (objOneMsg.Class) ' error handling here ... End Function