Rule Rule Rule Interface

Definition

Represents an Outlook rule.

public interface class Rule : Microsoft::Office::Interop::Outlook::_Rule
[System.Runtime.InteropServices.Guid("000630CD-0000-0000-C000-000000000046")]
public interface Rule : Microsoft.Office.Interop.Outlook._Rule
Public Interface Rule
Implements _Rule
Derived
Attributes
Implements

Remarks

This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _Rule.

Both client and server side rules are represented by the Rule object.

The Rules object model consists primarily of these objects: Rules, Rule, RuleActions, RuleConditions, RuleAction, RuleCondition, and the derived objects for certain rule actions and rule conditions. It provides partial parity with the Rules and Alerts Wizard in the Outlook user interface. Although it does not support creation of every single rule that you can possibly create using the Wizard, it supports the most commonly used rule actions and conditions.

For more information on how to programmatically create, edit, and delete rules, see Managing Rules in the Outlook Object ModelHow to: Create a Rule to Move Specific E-mails to a Folder

Properties

Actions Actions Actions

Returns a RuleActions collection object that represents all the available rule actions for the rule. Read-only.

(Inherited from _Rule)

Application Application Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

(Inherited from _Rule)

Class Class Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

(Inherited from _Rule)

Conditions Conditions Conditions

Returns a RuleConditions collection object that represents all the available rule conditions for the rule. Read-only.

(Inherited from _Rule)

Enabled Enabled Enabled

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

(Inherited from _Rule)

Exceptions Exceptions Exceptions

Returns a RuleConditions collection object that represents all the available rule exception conditions for the rule. Read-only.

(Inherited from _Rule)

ExecutionOrder ExecutionOrder ExecutionOrder

Returns or sets an Integer (int in C#) value that indicates the order of execution of the rule among other rules in the Rules collection. Read/write.

(Inherited from _Rule)

IsLocalRule IsLocalRule IsLocalRule

Returns a Boolean (bool in C#) that indicates if the rule executes as a client-side rule. Read-only.

(Inherited from _Rule)

Name Name Name

Returns or sets a String (string in C#) representing the name of the rule. Read/write.

(Inherited from _Rule)

Parent Parent Parent

Returns the parent Object of the specified object. Read-only.

(Inherited from _Rule)

RuleType RuleType RuleType

Returns a constant from the OlRuleType enumeration that indicates if the rule applies to messages that are being sent or received. Read-only.

(Inherited from _Rule)

Session Session Session

Returns the NameSpace object for the current session. Read-only.

(Inherited from _Rule)

Methods

Execute(Object, Object, Object, Object) Execute(Object, Object, Object, Object) Execute(Object, Object, Object, Object)

Applies a rule as an one-off operation.

(Inherited from _Rule)

Applies to