RDOSearches object |
RDOSearches collection represents search folders visible in the Outlook UI under "Search Folders" node in the Folder List pane in Outlook.
Note that a raw MAPI search folder (exposed by the RDOSearchFolder Redemption object) is not normally visible in the Search Folders node in Outlook.
Both template based ("Large Messages", "Unread Mail", etc) and custom search folders are supported.
Returned by:
RDOStore2.Searches
The example below creates 2 search folders: one that displays all messages larger than 1 Mb and another that shows all received messages that have the word "Redemption" in its subject or body.
set Session =
CreateObject("Redemption.RDOSession")
'Add a search folder that shows messages larger than 1MB. set NewSearch = Searches.AddLargeMessages("Huge Messages", 1048576) ' > 1MB
'Add a search folder that shows all received messages with the word "Redemption" in the message body or subject.
strSQL = "(Body LIKE '%Redemption%') OR (Subject LIKE
'%Redemption%') " |
Derived from: IDispatch |
|||
|
|||
Properties |
|||
|
|||
Count |
integer, read-only. Specifies the number of items in the collection.
|
||
Methods |
|||
|
|||
AddCategorized(Name, Categories) |
Adds and returns a search folder (RDOSearch) that displays messages with a category.
Name - string. The name of the search folder.
Categories - optional, string. If not specified, messages with any category will bee displayed. If specified, either a single category (e.g. "Business") or a ";" separated list of categories (e.g. "Business;Holiday").
|
set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddCategorized("Messages
with any category")
|
|
AddConversations(Name, AddressEntryOrArrayOfAddressEntires)
|
Adds and returns a search folder (RDOSearch) that displays messages from and to the specified people.
Name - string. The name of the search folder.
AddressEntryOrArrayOfAddressEntires - either an RDOAddressEntry or an array of RDOAddressEntryobjects.
|
set Session =
CreateObject("Redemption.RDOSession") set AddressEntry = Session.AddressBook.ResolveName("Smith, John") set NewSearch = Searches.AddConversations("Messages to/from John Smith", AddressEntry )
dim AddressEntries(1)
|
|
AddCustom(Name, SQLQuery, StartFolder, Recursive, ExcludedFoldersArray)
|
Adds and returns a search folder (RDOSearch) with a custom search criteria.
Name - string. The name of the search folder.
SQLQuery - string. Search criteria as a SQL string. Can be either a full SQL expression with both SELECT and WHERE clauses or just the WHERE clause without the WHERE keyword.
FolderOrArrayOfFolders - either RDOFolder object or an array of the RDOFolder objects, optional. Specifies the folder(s) where the search will be performed. If not specified, the root IPM folder (the top visible folder) will be used.
Recursive - boolean, optional. Specifies whether the search will include the child subfolders (if true) or only run in the specified folder(s) (if false). Defaults to TRUE if not specified.
ExcludedFoldersArray - array of integers, optional. Array of rdoDefaultFolders values (see example). If not specified, the following folders are excluded: olFolderDeletedItems, olFolderJunk, olFolderConflicts, olFolderLocalFailures, olFolderSyncIssues, olFolderOutbox.
|
set Session =
CreateObject("Redemption.RDOSession")
'Add a search folder that displays messages from the Sent Items and Drafts folders 'sent using accounts with "dimastr.com" in their names. strSQL = """http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8580001F""
LIKE '%dimastr.com%' "
'Add a search folder that shows all received messages with the word "Redemption" in the message body or subject.
strSQL = "(Body LIKE '%Redemption%') OR (Subject LIKE
'%Redemption%') "
|
|
AddFromSpecificPerson(Name, AddressEntryOrArrayOfAddressEntires) |
Adds and returns a search folder (RDOSearch) that displays messages from the specified people.
Name - string. The name of the search folder.
AddressEntryOrArrayOfAddressEntires - either an RDOAddressEntry or an array of RDOAddressEntryobjects.
|
set Session =
CreateObject("Redemption.RDOSession") set AddressEntry = Session.AddressBook.ResolveName("Smith, John") set NewSearch = Searches.AddFromSpecificPerson("Messages from John Smith", AddressEntry )
dim AddressEntries(1)
|
|
AddImportantMail(Name) |
Adds and returns a search folder (RDOSearch) that displays messages with high importance.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddImportantMail("Very Important Messages")
|
|
AddLargeMessages(Name, Size) |
Adds and returns a search folder (RDOSearch) that displays messages larger than the specified value.
Name - string. The name of the search folder. Size - integer. Message size, in bytes.
|
set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddLargeMessages("Huge Messages", 1048576) ' > 1MB
|
|
AddMarkedForFollowup(Name) |
Adds and returns a search folder (RDOSearch) that displays messages marked for follow-up.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddMarkedForFollowup("Marked for followup")
|
|
AddSentDirectlyToMe(Name)
|
Adds and returns a search folder (RDOSearch) that displays messages sent directly to the current user.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddSentDirectlyToMe("Seent To Me only")
|
|
AddSentToSpecificDistributionList(Name, AddressEntryOrArrayOfAddressEntires) |
Adds and returns a search folder (RDOSearch) that displays messages sent to the specified recipients.
Name - string. The name of the search folder.
AddressEntryOrArrayOfAddressEntires - either an RDOAddressEntry or an array of RDOAddressEntryobjects.
|
set Session =
CreateObject("Redemption.RDOSession")
set AE =
Session.AddressBook.ResolveName("List 1") |
|
AddOldMail(Name, TimeSpec, Value) |
Adds and returns a search folder (RDOSearch) that displays messages older than the specified value.
Name - string. The name of the search folder.
TimeSpec - one of the rdoTimePeriod enums: tpDay = 0
Value - integer. The number of units determined by the TimeSpec parameter.
|
tpMonth = 2 set Session =
CreateObject("Redemption.RDOSession") set NewSearch = Searches.AddOldMail("3 Moths Old Messages", tpMonth, 3)
|
|
AddUnreadMessages(Name)
|
Adds and returns a search folder (RDOSearch) that displays unread messages.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set Store = Session.Stores.DefaultStore set NewSearch = Searches.AddUnreadMessages("Unread messages")
|
|
AddUnreadOrMarkedForFollowup(Name)
|
Adds and returns a search folder (RDOSearch) that displays messages that are either unread or marked for follow-up.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set Store = Session.Stores.DefaultStore set NewSearch = Searches.AddUnreadOrMarkedForFollowup("Unread or marked for followup")
|
|
AddWithAttachments(Name) |
Adds and returns a search folder (RDOSearch) that displays messages with attachments.
Name - string. The name of the search folder.
|
set Session =
CreateObject("Redemption.RDOSession") set Store = Session.Stores.DefaultStore set NewSearch = Searches.AddWithAttachments("Messages with attachments")
|
|
AddWithSpecificWords(Name, Words) |
Adds and returns a search folder (RDOSearch) that displays messages with attachments.
Name - string. The name of the search folder.
Words - string. A single word or a ";" separated list of words.
|
set Session =
CreateObject("Redemption.RDOSession") set Store = Session.Stores.DefaultStore set NewSearch = Searches.AddWithSpecificWords("Messages with specific words", "OutlookSpy;Redemption") |
|
Item(Index) |
Returns a search folder (RDOSearch) with the specified index
Index - integer. 1 through Count.
|
set Session =
CreateObject("Redemption.RDOSession") |
|
|