RDOSearchCriteria object |
RDOSearchCriteria object represents a restriction used by a MAPI search folder (RDOSearchFolder object). All changes made to this object are only applied after RDOSearchFolder.Start method is called.
Returned by:
RDOSearchFolder.SearchCriteria
The example below logs to the default MAPI session and creates a new search folder that contains messages with the "test" substring in the subject property. The search is performed in the Inbox and Sent Items folders.
Note that you will need to wait until RDOSearchFolder.IsRebuild property (see below) becomes false, meaning that Outlook finished searching through the specified folders.
Also note that the newly created folder will not be displayed as one of the "Search Folders" subfolders in Outlook 2003. Use RDOSearches and RDOSearch objects for that.
RES_CONTENT = 3 |
The example below creates the same search folder as the one above but uses AsSQL property instead of SetKind.
'create new search folder
NewSearchFolder.SearchCriteria.AsSQL = "Subject LIKE '%test%' " |
Derived from: IDispatch |
||
|
||
|
||
Properties |
||
|
||
AsSQL |
String, read/write. Get or sets the search criteria as a SQL string The value only contains the WHERE clause (without the WHERE keyword), e.g. "(ReminderSet = 'True') OR ((IsRecurring IS NOT NULL) AND (IsRecurring = 'True'))"
See MAPITable.ExecSQL method help for more information.
|
'display the Reminders search folder search criteria as a SQL string set Session =
CreateObject("Redemption.RDOSession")
'also see the example above
|
Restriction |
Returns an Restriction object representing the search folder's criteria. For a new search folder, or if Clear method was called, this property returns NULL. |
|
Methods |
||
|
||
Clear |
Clear the old restriction.
|
|
SetKind(Kind) |
Sets new search criteria determined by the Kind parameter and returns a new Restriction object. The exact kind of the restriction returned is determined by Kind papameter. Kind - one of the RestrictionKind enumeration values: RES_AND (0) |
see example above |