Compartir a través de


Rule Interface

Represents an Outlook rule.

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

Syntax

'Declaration
<GuidAttribute("000630CD-0000-0000-C000-000000000046")> _
<CoClassAttribute(GetType(RuleClass))> _
Public Interface Rule _
    Inherits _Rule
'Usage
Dim instance As Rule
[GuidAttribute("000630CD-0000-0000-C000-000000000046")]
[CoClassAttribute(typeof(RuleClass))]
public interface Rule : _Rule

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 Model and How to: Create a Rule to Move Specific E-mails to a Folder.

See Also

Reference

Rule Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Create a Rule to File Mail Items from a Manager and Flag Them for Follow-Up

How to: Execute a Rule Instantly

How to: Execute a Rule on a Local Computer

How to: Create a Rule to Assign Categories to Mail Items Based on Multiple Words in the Subject