Partager via


_Store.GetRules Method

Returns a Rules collection object that contains the Rule objects defined for the current session.

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

Syntax

'Declaration
<DispIdAttribute()> _
Function GetRules As Rules
'Usage
Dim instance As _Store
Dim returnValue As Rules

returnValue = instance.GetRules()
[DispIdAttribute()]
Rules GetRules()

Return Value

Type: Microsoft.Office.Interop.Outlook.Rules
A Rules collection object that represents the set of Rules defined for the current session.

Remarks

Calling GetRules can be an expensive operation in terms of performance on slow connections to an Exchange server.

The order of the Rule objects in the collection returned from GetRules follows that of _Rule.ExecutionOrder with ExecutionOrder equal 1 being the first Rule in the collection and ExecutionOrder equal _Rules.Count being the last Rule in the collection.

See Also

Reference

_Store Interface

_Store 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