Class Rule (Outlook VBA)
The class Rule represents an Outlook rule.
Dim rul as Rule
Set rul = Session.DefaultStore.GetRules(Index:=1)
For Each
Here is an example of processing the Rule items in a collection.
Dim rulGetRule As Rule
For Each rulGetRule In Session.DefaultStore.GetRules()
Next rulGetRule
Methods
Execute - Applies a rule as a one-off operation.
Properties
Actions returns a RuleActions collection object that represents all the available rule actions for the rule.
Class returns an OlObjectClass constant indicating the object's class.
Conditions returns a RuleConditions collection object that represents all the available rule conditions for the rule.
Enabled returns or sets a Boolean value that determines if the rule is to be applied.
Exceptions returns a RuleConditions collection object that represents all the available rule exception conditions for the rule.
ExecutionOrder returns or sets a Long that indicates the order of execution of the rule among other rules in the Rules collection.
IsLocalRule returns a Boolean that indicates if the rule executes as a client-side rule.
Name returns or sets a String representing the name of the rule.
RuleType returns a constant from the OlRuleType enumeration that indicates if the rule applies to messages that are being sent or received.
Session returns the NameSpace object for the current session.
Related Classes
NameSpace - Represents an abstract root object for any data source.
RuleActions - The RuleActions object contains a set of RuleAction objects or objects derived from RuleAction, representing the actions that are executed on a Rule object.
RuleConditions - Contains a set of RuleCondition objects or objects derived from RuleCondition, representing the conditions or exception conditions that must be satisfied in order for the Rule to execute.