Task Item-Specific Propertiesand the Fields Collection
I’ve already said that CDO doesn’t support any task item-specific properties. In such cases, it is often possible to use a CDO object’s Fields collection to access the underlying MAPI properties that aren’t directly exposed. Indeed, that’s what the Fields collection is for. The following paragraphs discuss the Fields collection, specifically of Message objects that represent task items. You’ll see how to discover all of the properties exposed by a MAPI object. Ultimately, the task item-specific properties will remain (almost) out of our reach, but along the way you’ll learn some good reusable techniques. Finally, if you don’t mind taking some risk, you’ll learn how to access the task item-specific properties anyway.
The designers of CDO knew that it would be impractical to expose every underlying property that a MAPI object could have. More importantly, MAPI applications are permitted to add custom properties to MAPI objects dynamically. Clearly, CDO’s designers couldn’t know in advance what custom properties application developers would add. By providing a mechanism to access such properties in a generic way, CDO’s designers provided a great deal of flexibility.
Consider an example. Folders in the Microsoft Exchange Server information store expose a property that indicates whether there are rules configured for that folder. CDO knows nothing of this property, so it’s not exposed by CDO’s Folder object. It can nevertheless ...