Platform SDK: Exchange Server |
The Action COM class defines an object with properties that you can use to modify actions.
Use the Action COM class to create an action to take when a rule condition is satisfied. The class defines an object with two properties: ActionType and Arg. The ActionType property specifies what action the rule should perform when the corresponding rule condition is satisfied The Arg property holds the information required to perform that particular action. The contents of the Arg property depend on the value of the ActionType property.
The following example creates an action that moves messages to the Deleted Items folder.
const ACTION_MOVE = 1 Set mySession = CreateObject("MAPI.Session") mySession.Logon "","",false,true,true,true,"SERVER" & vbLF & "TestUser" Set InfoStore = objSession.InfoStores (2) Set myPrivateFs = InfoStore.RootFolder.Folders For Each myFolder in myPrivateFs If myFolder.Name = "Deleted Items" ActionFolder = myFolder Exit For End If Next Set myAction = CreateObject("MSExchange.Action") myAction.ActionType = ACTION_MOVE myAction.Arg = ActionFolder ...