Attribute VB_Name = "Module1"
Sub main()
Dim oConn As New ADODB.Connection
Dim oRec As New ADODB.Record
Dim strURL As String

On Error Resume Next

strURL = "http://yws/exchange/user1/"

With oConn
    .Provider = "msdaipp.dso"
    .ConnectionString = strURL
    .Open , "user1", ""
End With

oRec.Open strURL & "inbox/", oConn
Debug.Print oRec.Fields("urn:schemas:mailheader:content-class").Name & " = " & oRec.Fields("urn:schemas:mailheader:content-class").Value
oRec.Close

oRec.Open strURL & "calendar/", oConn
Debug.Print oRec.Fields("urn:schemas:mailheader:content-class").Name & " = " & oRec.Fields("urn:schemas:mailheader:content-class").Value

Set oRec = Nothing

Stop

End Sub
