This article has been archived. It is offered "as is" and will no longer be updated.
When attempting to set the value of a field (property) of a CollaborationData Objects (1.1, 1.2, 1.21) object, the following error may occur:
The field probably does not yet exist in the underlying MessagingApplication Programming Interface (MAPI) object.
Instead of just setting the field value, proceed from the assumption thatthe field does not exist. Use the Add method of the Fields collection,which facilitates both adding the field and setting the value as follows:
objMsg.Fields.Add &H00150040, 234
The sample above demonstrates adding and setting the value for thePR_EXPIRY_LIMIT (&H00150040) field. No error occurs if the property alreadyexists.
This behavior is by design.
Steps to Reproduce Behavior
Create a message object called objMsg.
Try to set a property not directly exposed by CDO (1.1, 1.2, 1.21) (such as PR_EXPIRY_LIMIT (&H00150040)):
objMsg.Fields(&H00150040) = 234
Note that the above statement fails with this error: