Compartir a través de


Search.Filter Property

Returns a String (string in C#) value that represents the DASL statement used to restrict the search to a specified subset of data. Read-only

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
ReadOnly Property Filter As String
    Get
'Usage
Dim instance As Search
Dim value As String

value = instance.Filter
[DispIdAttribute()]
string Filter { get; }

Property Value

Type: System.String

Remarks

This property is set as the Filter argument in the Application object's AdvancedSearch method.

When searching Text fields, you can use either an apostrophe (') or double quotation marks ("") to delimit the values that are part of the filter. For example, all of the following lines function correctly when the field is of type String (string in C#):

sFilter = "[CompanyName] = 'Microsoft'"
sFilter = "[CompanyName] = 'Microsoft'";
sFilter = "[CompanyName] = ""Microsoft"""
sFilter = "[CompanyName] = ""Microsoft""";
sFilter = "[CompanyName] = " & Chr(34) & "Microsoft" & Chr(34)
sFilter = "[CompanyName] = " & Chr(34) & "Microsoft" & Chr(34);

See Also

Reference

Search Interface

Search Members

Microsoft.Office.Interop.Outlook Namespace