Rule.Enabled property (Outlook)

Returns or sets a Boolean value that determines if the rule is to be applied. Read/write.

Syntax

expression.Enabled

expression A variable that represents a Rule object.

Remarks

Setting the Enabled property of a rule does not guarantee that the rule will be enabled. The rule is enabled only after Rules.Save executes successfully.

Using Rule.Enabled and Rules.Save applies the rule consistently and persists the rules beyond the current session. Enabling a rule (that has been saved successfully) ensures that the rule will be applied. If it is a local client rule, the rule will be applied when Outlook is running, and if the rule is a server-based rule, it will be applied regardless of whether Outlook is running. If you don't enable the rule, then the rule is defined, but it will not be applied. However, you can use Rule.Execute to apply a rule as a one-off operation regardless of whether the rule is enabled.

See also

Rule Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.