_Rule.Actions Property

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

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

Syntax

'Declaration
<DispIdAttribute()> _
ReadOnly Property Actions As RuleActions
    Get
'Usage
Dim instance As _Rule
Dim value As RuleActions

value = instance.Actions
[DispIdAttribute()]
RuleActions Actions { get; }

Property Value

Type: Microsoft.Office.Interop.Outlook.RuleActions

Remarks

You can enumerate and enable rules with any rule action that the Rules and Alerts Wizard support, but you can programmatically create rules that have only the most commonly used rule actions, and not any rule action that the Rules and Alerts Wizard supports. For more information on rule action support, see Specify Rule Actions.

Through the Actions property, each rule is associated with a RuleActions object. The RuleActions collection is a fixed object - you cannot add or remove items from this collection. Rule actions that are enabled in the rule will have an enabled rule action in the RuleActions collection. Rule actions that are not enabled in the rule will have a rule action in this collection that has the _RuleAction.Enabled property set to False. Rule actions that are not supported during programmatic rule creation can only be enumerated in the RuleActions collection for an existing rule, but because the RuleActions collection is fixed, you cannot create a rule and add such an action to the associated RuleActions collection.

See Also

Reference

_Rule Interface

_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: Create a Rule to Assign Categories to Mail Items Based on Multiple Words in the Subject