Share via


_RuleCondition.Enabled Property

Returns or sets a Boolean (bool in C#) that determines if the RuleCondition is enabled. Read/write.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Property Enabled As Boolean
    Get
    Set
'Usage
Dim instance As _RuleCondition
Dim value As Boolean

value = instance.Enabled

instance.Enabled = value
[DispIdAttribute()]
bool Enabled { get; set; }

Property Value

Type: System.Boolean

Remarks

After you enable a rule condition, you must also save the rule by using _Rules.Save so that the rule condition and its enabled state will persist beyond the current session. A rule condition is only enabled after it has been saved successfully.

Returns an error if you attempt to enable a rule condition that is supported only on a rule of type olRuleSend for a rule of type olRuleReceive, or vice versa. For more information on suppport by rules for receiving messages or rules for sending messages, see Specifying Rule Conditions.

You cannot enable or disable a condition of type olConditionOtherMachine. This type of rule condition indicates that the rule can run only on a specific computer that is not the current one. This happens when the rule is created on that computer and the rule condition olConditionLocalMachineOnly is enabled, indicating that the rule can run only on that computer. When you run the same rule on another computer, the rule will show that the condition olConditionOtherMachine is enabled.

Returns an error if you attempt to enable an exception condition of type olConditionLocalMachineOnly.

See Also

Reference

_RuleCondition Interface

_RuleCondition Members

Microsoft.Office.Interop.Outlook Namespace