Upravit

Sdílet prostřednictvím


_Rule.Enabled Property

Definition

Returns or sets a Boolean value (bool in C#) that determines if the rule is to be applied. Read/write.

public:
 property bool Enabled { bool get(); void set(bool value); };
public bool Enabled { get; set; }
Public Property Enabled As Boolean

Property Value

Remarks

Setting the Enabled property of a rule does not guarantee that the rule will be enabled. The rule is enabled only after Save(Object) 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 do not enable the rule, then the rule is defined, but it will not be applied. However, you can use Execute(Object, Object, Object, Object) to apply a rule as an one-off operation regardless of whether the rule is enabled.

Applies to