| 
			 
			 
    	    
		 | 
			
		
   
RDOClientRules 
represents a set of RDOClientRule objects that 
are the rules available in the current session. 
  
Returned by:  
RDOSession.OpenRulesFile 
RDOStore2.ClientRules 
  
The example below enumerates all 
rules in the default store in the current profile and prints their names. 
  
    | 
	 
	set Session = CreateObject("Redemption.RDOSession") 
	
	
	Session.MAPIOBJECT = Application.Session.MAPIOBJECT 
	
	set ClientRules = Session.Stores.DefaultStore.ClientRules 
	
	for 
	each ClientRule 
	in ClientRules 
	
	
	  Debug.Print ClientRule.Name 
	
	next 
	 | 
   
 
  
Properties 
Methods 
  
  
	
		
  | 
	 
	
		
		Derived from: 
		IDispatch
		 | 
	 
	
		
		
  | 
	 
	
		
		Properties | 
	 
	
		
		
  | 
	 
	
		| 
		Count | 
		
		integer, read-only. The number of rules in the collection. 
		 | 
		
		  | 
	 
	
		| 
		Session | 
		
		RDOSession, read-only. Returns the parent
		RDOSession object. 
		 | 
		
		  | 
	 
	
		| 
		_Item[Index] | 
		
		RDOClientRule, read-only. Default 
		indexed property. 
		Returns RDOClientRule object with the 
		specified index (1 through Count) 
		 | 
		
		 | 
	 
	
		
  | 
	 
	
		
		Methods | 
	 
	
		
		
  | 
	 
	
		
		Create(Name, RuleType) 
		 | 
		
		Creates an RDOClientRule object with the 
		name specified by Name and the type of rule specified by 
		RuleType. 
		 
		Name - string 
		 
		RuleType - rdoRuleType. 
		olRuleReceive = 0 
		olRuleSend = 1 
		 
		 | 
		
		 
		set Session = CreateObject("Redemption.RDOSession") 
		
		
		Session.MAPIOBJECT = Application.Session.MAPIOBJECT 
		
		set colRules = 
		Session.Stores.DefaultStore.ClientRules 
		
		Set oRule = colRules.Create("Test rule", olRuleReceive) 
		
		'Specify 
		the condition in a ToOrFromRuleCondition object 
		
		
		'Condition is if the message is sent by "test@dimastr.com" 
		
		Set oFromCondition = oRule.Conditions.From 
		
		With oFromCondition 
		
		
		  .Enabled = 
		True 
		
		
		  .Recipients.AddEx 
		"Joe The User", 
		"test@dimastr.com", 
		"SMTP" 
		
		End 
		With 
		
		'Specify 
		the action in a MoveOrCopyRuleAction object 
		
		'Action 
		is to move the message to the target folder 
		
		
		set oMoveTarget = Session.Stores.DefaultFolder(olFolderInbox)._ 
		
		     
		 Folders.OpenOrAdd("Test folder") 
		
		Set oMoveRuleAction = 
		oRule.Actions.MoveToFolder 
		
		With oMoveRuleAction 
		
		
		  .Enabled = 
		True 
		
		
		  .Folder = oMoveTarget 
		
		
		 End 
		With 
		
		'Specify 
		the exception condition for the subject in a  
		
		'TextRuleCondition object 
		
		
		'Exception condition is if the subject contains "fun" or "chat" 
		
		Set oExceptSubject = oRule.Exceptions.Subject 
		
		With oExceptSubject 
		
		
		  .Enabled = 
		True 
		
		
		  .Text = 
		Array("fun", 
		"chat") 
		
		End 
		With 
		
		'Update 
		the rules 
		
		
		colRules.Save 
		 | 
	 
	
		
		Export(FileName) 
		 | 
		
		Exports the rules in the RWZ format to the file specified by the 
		FileName parameter. 
		 
		FileName  - string. Fully qualified RWZ file name. 
		 
		 | 
		
		 | 
	 
	
		
		GetFirst 
		 | 
		
		Returns RDOClientRule object that 
		represents the first object contained by the collection. 
		 
		To ensure correct operation of the GetFirst, 
		GetLast, GetNext, and GetPrevious 
		methods in a large collection, call GetFirst before 
		calling GetNext on that collection and call 
		GetLast before calling GetPrevious. 
		 
		 | 
		
		  | 
	 
	
		
		GetLast 
		 | 
		
		Returns RDOClientRule object that 
		represents the last object contained by the collection. 
		 
		To ensure correct operation of the GetFirst, 
		GetLast, GetNext, and GetPrevious 
		methods in a large collection, call GetFirst before 
		calling GetNext on that collection and call 
		GetLast before calling GetPrevious. 
		 
		 | 
		
		  | 
	 
	
		
		GetNext 
		 | 
		
		Returns RDOClientRule object that 
		represents the next object contained by the collection. 
		 
		To ensure correct operation of the GetFirst, 
		GetLast, GetNext, and GetPrevious 
		methods in a large collection, call GetFirst before 
		calling GetNext on that collection and call 
		GetLast before calling GetPrevious. 
		 
		 | 
		
		  | 
	 
	
		
		GetPrevious 
		 | 
		
		Returns RDOClientRule object that 
		represents the previous object contained by the collection. 
		 
		To ensure correct operation of the GetFirst, 
		GetLast, GetNext, and GetPrevious 
		methods in a large collection, call GetFirst before 
		calling GetNext on that collection and call 
		GetLast before calling GetPrevious. 
		 
		 | 
		
		  | 
	 
	
		
		Import(FileName, ReplaceExistingRules) 
		 | 
		
		Imports the rules in the RWZ format specified by the FileName parameter 
		into the current rules collection. 
		 
		FileName  - string. Fully qualified RWZ file name. 
		 
		ReplaceExistingRules - boolean. If true, all rules in 
		the collection are replaced with the rules in the specified file. If 
		false, the new rules are appended to the collection. 
		 
		 | 
		
		  | 
	 
	
		
		Item(Index) 
		 | 
		
		Return RDOClientRule object with the 
		specified index (1 through Count) or specified name. 
		 
		Index - variant, string or integer. 
		 
		 | 
		
		  | 
	 
	
		
		Remove(Index) 
		 | 
		
		Removes the rule with the specified index (1 through Count) or specified 
		name. 
		 
		Index - variant, string (rule name) or integer (1 
		through Count). 
		 
		 | 
		
		  | 
	 
	
		
		Save 
		 
		 | 
		
		Save the rules to the store (if returned from 
RDOStore2.ClientRules) or the RWZ file (if returned from RDOSession.OpenRulesFile) 
		 
		 | 
		
		  | 
	 
	
		| 
		 | 
	 
	 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
                 |