Platform SDK: Exchange Server

IRules::Add Method

Inserts the Rule object before the object at the specified position.

IDL Definition

HRESULT Add([in,optional] VARIANT index, [in] IDispatch *pRule)

Visual Basic Definition

Sub Add([index],pRule As Object)

Parameters

index
An optional integer specifying the position of the rule before which the new rule is inserted. The first rule is at position 1. If you don't supply this parameter, the new rule is added at position Count + 1.
pRule
The Rule object to add.

Remarks

If you do not add the rule to the default position, the Rule object's indices are not in order. To update the indices, call the IRules::UpdateIndicesmethod. You must call the Update method to make the change permanent.