| Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
All Exchange folders and items have content-class values that denote their intended purpose. A folder, in terms of the underlying Exchange class hierarchy, is an item that is a collection of other items. Exchange applications can use content-class values to determine how to process the data an item contains.
You can check the content-class using an ADO Record object before you instantiate any CDO objects. To do so, you can check the value of the DAV:contentclass schema field.
Alternatively, if you know the item is a folder by checking its DAV:iscollection schema field value, you can then instantiate a CDO Folder object from a URL or from an ADO Record object and then check the IFolder::ContentClass property.
Dim CC as String
Dim Rec As New ADODB.Record
With Rec
.Open strFolderURL
CC = .Fields("DAV:contentclass")
If CC = "urn:content-classes:contactfolder" Then
'
Else If CC = "urn:content-classes:mailfolder" Then
'
End If
Rec.Close
End With
'To check a folder Content-Class using a CDO Folder object
Dim iFldr As New CDO.Folder
Dim iDsrc as CDO.IDataSource
Set iDsrc = iFldr
iDsrc.Open strFolderURL
If iFldr.ContentClass = "urn:content-classes:mailfolder" Then
'
End If