Platform SDK: Exchange Server

SubCondition CoClass

The SubCondition COM class defines an object with properties that you can use to specify an attachment or recipient condition.

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

Remarks

Use the SubCondition object to identifies messages where a condition is contained as a subordinate condition.

Example

The following example identifies messages where Fred is in the To field:

const CdoPR_SENDER_NAME = &H0C1A001E
const REL_EQ            = 7
const MSG_RECIP         = 1

Set objPropVal   = CreateObject("MSExchange.PropertyValue")
objPropVal.Tag   = CdoPR_SENDER_NAME
objPropVal.Value = "Fred"

Set objPropCond         = CreateObject("MSExchange.PropertyCondition")
objPropCond.Value       = objPropVal
objPropCond.Operator    = REL_EQ
objPropCond.PropertyTag = CdoPR_SENDER_NAME

Set objCmtCond      = CreateObject("MSExchange.CommentCondition")
objCmtCond.Condition = objPropCond

Set objSubCond       = CreateObject("MSExchange.SubCondition")
objSubCond.Condition = objCmtCond
objSubCond.Operator  = MSG_RECIP
...