Function Reference

_OL_ViewFormatRuleAdd

Adds/inserts a new AutoFormat rule to a view.

#Include <OutlookEX_GUI.au3>
_OL_ViewFormatRuleAdd($oOL, $vView, $vFolder, $sName, $sFilter, $iIndex = Default, $bEnabled = True)

 

Parameters

$oOL Outlook object returned by a preceding call to _OL_Open()
$vView Index, name or object of the view to be modified
$vFolder Folder object as returned by _OL_FolderAccess or full name of folder. Has to be specified when $vView is not a view object, els the parameter is ignored
$sName Display name for the view (default = do not modify)
$sFilter [optional] String in DAV Searching and Locating (DASL) syntax that represents the current filter for the view (default = do not modify)
$iIndex [optional] Either the index number at which to insert the rule, or the name of a rule in the collection where the new rule is to be inserted. See Remark
$bEnabled [optional] Indicates whether the formatting rule is enabled (default = True)

 

Return Value

Success: Object of the Format Rule
Failure: Returns 0 and sets @error:
    1 - $vFolder has not been specified

 

Remarks

$iIndex: When set to ...

 

Related