Class Property (All CDO Library Objects)
Topic Last Modified: 2004-06-09
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 |
|
8 |
CdoAddressEntry | |
|
9 |
CdoAddressFilter | |
|
7 |
CdoAddressList | |
|
AddressLists collection |
20 |
CdoAddressLists |
|
26 |
CdoAppointment | |
|
5 |
CdoAttachment | |
|
Attachments collection |
18 |
CdoAttachments |
|
6 |
CdoField | |
|
Fields collection |
19 |
CdoFields |
|
2 |
CdoFolder | |
|
Folders collection |
15 |
CdoFolders |
|
25 |
CdoGroupHeader | |
|
1 |
CdoInfoStore | |
|
InfoStores collection |
14 |
CdoInfoStores |
|
27 |
CdoMeetingItem | |
|
3 |
CdoMsg | |
|
10 |
CdoMessageFilter | |
|
Messages collection |
16 |
CdoMessages |
|
4 |
CdoRecipient | |
|
Recipients collection |
17 |
CdoRecipients |
|
28 |
CdoRecurrencePattern | |
|
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