RDOAddressListSearch object

 

RDOAddressListSearch object allows to set search criteria on a particular address list (represented by the RDOAddressList object).

WARNING: among standard Outlook Address book providers, only the Exchange Address Book provider supports this feature.

 

Returned by:

RDOAddressList.Search

 

To use the RDOAddressListSearch object, set its properties (such as Firstname, City, etc.), then call RDOAddressListSearch.GetResults to retrieve the RDOAddressEntries collection containing the results matching the restriction.

The example below finds all Exchange users with the first name of John in Phoenix: 

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set AddrList = Session.Addressbook.GAL
set Search = AddrList.Search
Search.FirstName = "John"
Search.City = "Phoenix"
set AddressEntries = Search.GetResults
for each AddressEntry in AddressEntries
    Debug.Print AddressEntry.Name
next

 

Properties

Methods

 


Derived from: IDispatch


Properties


Alias
string, read/write. Corresponds to the PR_ACCOUNT MAPI property.
 
 
City
string, read/write. Corresponds to the PR_BUSINESS_ADDRESS_CITY MAPI property.
 
 
Company
string, read/write. Corresponds to the PR_COMPANY_NAME MAPI property.
 
 
Department
string, read/write. Corresponds to the PR_DEPARTMENT_NAME MAPI property.
 
 
DisplayName
string, read/write. Corresponds to the PR_DISPLAY_NAME MAPI property.
 
 
FirstName
string, read/write. Corresponds to the PR_GIVEN_NAME MAPI property.
 
LastName
string, read/write. Corresponds to the PR_SURNAME MAPI property.
 
 
Office
string, read/write. Corresponds to the PR_OFFICE_LOCATION MAPI property.
 
 
SearchFields[PropTag]
Read/write. Allows to explicitly specify the MAPI property tag to search on, e.g. PR_BUSINESS_ADDRESS_COUNTRY (see example)
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set AddrList = Session.Addressbook.GAL
set Search = AddrList.Search
Search.SearchFields("http://schemas.microsoft.com/mapi/proptag/0x3A26001F") = "United States"
set AddressEntries = Search.GetResults
for each AddressEntry in AddressEntries
    Debug.Print AddressEntry.Name
next
Title
string, read/write. Corresponds to the PR_TITLE MAPI property.
 
 

Methods


GetResults
Returns RDOAddressEntries collection of items restricted by the values of the specified properties above.