Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
There are four specifications for a content-class definition:
This specification is optional.
Const adModeReadWrite = 3 Const adFailIfNotExists = -1 Const adCreateNonCollection = 0 'this task defines a content class for the cookbook scenario Dim strURL strURL = "file://./backofficestorage/microsoft.com/public folders/cookbook/schema/" Dim Rec Set Rec = CreateObject("ADODB.Record") ' Create a content class definition item in my application ' schema folder. Rec.Open strURL & "ccdef",,adModeReadWrite, adCreateNonCollection Dim Flds Set Flds = Rec.Fields With Flds ' Name the content class. .Item("urn:schemas-microsoft-com:xml-data#name").Value = _ "urn:schemas-microsoft-com:content-classes:cookbook" ' The content class of the definition item. .Item("DAV:contentclass") = "urn:content-classes:contentclassdef" ' The content classes it extends (inherits from). .Item("urn:schemas-microsoft-com:xml-data#extends").Value = _ Array("urn:content-classes:item", "urn:content-classes:person") ' The properties to belong to this content class. .Item("urn:schemas-microsoft-com:xml-data#element").Value = _ Array("urn:schemas-microsoft-com-cookbook:submitdate",_ "urn:schemas-microsoft-com-cookbook:cuisine", _ "urn:schemas-microsoft-com-cookbook:title", _ "urn:schemas-microsoft-com-cookbook:ingredients", _ "urn:schemas-microsoft-com-cookbook:instructions", _ "urn:schemas-microsoft-com-cookbook:rating") 'If you are defining a folder content class, this is a good place 'to specify expected content class. Then you wouldn't have to specify 'all participating content classes on all folders. '.Item("urn:schemas-microsoft-com:exch-data:expected-content-class").Value = _ ' Array("urn:schemas-microsoft-com:content-classes:aclass", _ ' "urn:schemas-microsoft-com:content-classes:anotherclass") .Update Rec.Close .Update End With Rec.Close