RuleConditions.MessageHeader Property (Outlook)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns a TextRuleCondition object with a TextRuleCondition.ConditionType of olConditionMessageHeader. Read-only.

expression .MessageHeader

expression A variable that represents a RuleConditions object.

Use the returned TextRuleCondition object when enumerating the rule conditions or exception conditions of an existing rule, or when creating a new rule that specifies the condition or exception condition that the message header contains the specified text.

This property of the RuleConditions collection always returns a TextRuleCondition object regardless of whether the rule associated with this RuleConditions collection has defined such a rule condition. If the rule has defined and enabled such a rule condition, then TextRuleCondition.Enabled will be True.