AutoFormatRule.Filter Property
Outlook Developer Reference |
Returns or sets a String value that represents the filter for a custom formatting rule. Read-write.
Version Information
Version Added: Outlook 2007
Syntax
expression.Filter
expression A variable that represents an AutoFormatRule object.
Remarks
The value of this property is a DAV Searching and Locating (DASL) string that represents the current filter for the custom formatting rule. For more information about using DASL to filter items formatted by the formatting rule, see Filtering Items. Setting this property to an empty string applies the custom formatting rule to all items displayed by the view.
Note |
---|
This property returns an empty string for a standard formatting rule (an AutoFormatRule object with a Standard property value set to True). An error occurs if you attempt to assign a value to this property for a standard formatting rule. |
Example
The following Visual Basic for Applications (VBA) example obtains a View object by using the CurrentView property of the Explorer object, and then creates a new AutoFormatRule named "Handoff Messages." The Filter property of the AutoFormatRule object is set so that the formatting rule applies to any message in which the Subject property value starts with "HANDOFF". The sample then sets the properties of the Font object for the AutoFormatRule object the so that messages to which the formatting rule applies are displayed in blue, bold, 8 point Courier New text.
Visual Basic for Applications |
---|
|
See Also