_Rules.Save Method

Saves all rules in the Rules collection.

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

Syntax

'Declaration
<DispIdAttribute()> _
Sub Save ( _
    ShowProgress As Object _
)
'Usage
Dim instance As _Rules
Dim ShowProgress As Object

instance.Save(ShowProgress)
[DispIdAttribute()]
void Save(
    Object ShowProgress
)

Parameters

  • ShowProgress
    Type: System.Object

    True to display the progress dialog box, False to save rules without showing the progress.

Remarks

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

Rules.Save can be an expensive operation in terms of performance on slow connections to Exchange server. For more information on using the progress dialog box, see Managing Rules in the Outlook Object Model.

Saving rules that are incompatible or have improperly defined actions or conditions (such as an empty string for _TextRuleCondition.Text) will return an error.

The Exchange server limits the maximum number of rules that can be supported by a store. Rules.Save returns an error when this limit is reached.

See Also

Reference

_Rules Interface

_Rules 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