Platform SDK: Exchange Server

ContentCondition CoClass

The ContentCondition COM class defines an object with properties that you can use to test the contents of a property tag.

CLSID
D61B2A8E-07A1-11D2-BC0D-00C04F8C92F7
ProgID
MSExchange.ContentCondition
Type Library
Microsoft Exchange 5.5 Rules Type Library 1.0 (Rule.dll)
Threading Model
Single-threaded apartment (STA)
Interfaces
The ContentCondition class exposes the IContentCondition dual interface.

Remarks

Use the ContentCondition object to identify messages by text in the CDO properties CdoPR_SUBJECT (&H0037001E), which is the Subject field, or CodPR_BODY (&H1000001E), which is the Body of the message.

Example

The following example creates a condition that identifies messages with the word "delete" in the Subject field.

const CdoPR_SUBJECT = &H0037001E
const FULLSTRING    = 0

Set objPropVal   = CreateObject("MSExchange.PropertyValue")
objPropVal.Tag   = CdoPR_SUBJECT
objPropVal.Value = "delete"

Set objContCond          = CreateObject("MSExchange.ContentCondition")
objContCond.Value        = objPropVal
objContCond.PropertyType = CdoPR_SUBJECT
objContCond.Operator     = FULLSTRING
...