Class Property (All CDO Rendering Library Objects)
Class Property (All CDO Rendering Library Objects)
Important The Collaboration Data Objects (CDO) 1.2.1 Rendering objects are not installed by or supported for use with Exchange Server 2003 or later.
The Class property returns the object class of the object. Read-only.
Syntax
object.Class
Data Type
Long
Remarks
The Class property contains a numeric constant that identifies the CDO Rendering Library object. The following values are defined:
CDO Rendering Library object |
Class value |
Type library constant |
12 |
CdoClassCalendarView |
|
11 |
CdoClassColumn |
|
Columns collection |
10 |
CdoClassColumns |
3 |
CdoClassContainerRenderer |
|
4 |
CdoClassFormat |
|
Formats collection |
5 |
CdoClassFormats |
2 |
CdoClassObjectRenderer |
|
7 |
CdoClassPattern |
|
Patterns collection |
6 |
CdoClassPatterns |
1 |
CdoClassApplication |
|
9 |
CdoClassTableView |
|
Views collection |
8 |
CdoClassViews |
The CDO Rendering Library reserves the value 0 for an object implementing the OLE IUnknown interface.
Example
This code fragment traverses a Views collection to find the class of each view object it contains:
Dim colViews
Dim objView ' could be any type of view object
If colViews Is Nothing Then
objResponse.Write "Need to set the Views collection"
End
End If
For Each objView in colViews
strIndex = str(objView.Index) ' get view's index as a string
If 9 = objView.Class Then ' CdoClassTableView
objResponse.Write "View " & strIndex & " is a table view"
ElseIf 12 = objView.Class Then ' CdoClassCalendarView
objResponse.Write "View " & strIndex & " is a calendar view"
Else
objResponse.Write "Unknown view type: class " & str(objView.Class)
End If
Next
' error handling here ...