RDOAddressBookSearchPath object collection

 

RDOAddressBookSearchPath collection represents the list of containers used in the automatic name resolution. This list in set the Outlook UI in the Address Book Options dialog (Tools | Address Book | Tools | Options).

Returned by: RDPAddressBook.SearchPath

 

The example below logs to the default MAPI session and add an address list named called "Test Contacts" to the search path

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set AddrList = Session.AddressBook.AddressLists.Item("Test Contacts")
Session.AddressBook.SearchPath.Add(AddrList)


Derived from: IDispatch


Properties


Count

integer, read-only. The number of address lists in the RDOAddressBookSearchPath collection

 

Item(Index)

Index - integer or a string. A default object property.

Retrieves an Address List with a given index (1 to Count) or a given subject

Returns AddressList object

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set SearchPath = Session.AddressBook.SearchPath
for i = 1 to SearchPath.Count

  Set AddressList= SearchPath.Item(i)
  Debug.Print AddressList.Name
next


Methods


Add(AddressListOrEntryID)

Adds the address list given by the AddressListOrEntryID parameter to the address book search path.

AddressListOrEntryID -either RDOAddressList object or its entry id (string).

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set AddrList = Session.AddressBook.AddressLists.Item("Test Contacts")
Session.AddressBook.SearchPath.Add(AddrList)

Remove(AddressListOrEntryIdOrIndex)

Removes the address list given by the AddressListOrEntryIdOrIndex parameter from the address book search path.

AddressListOrEntryIdOrIndex - either RDOAddressList object, its entry id (string) or an integer index (1 to Count).

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set AddrList = Session.AddressBook.AddressLists.Item("Contacts")
Session.AddressBook.SearchPath.Remove(AddrList)

IndexOf(AddressListOrEntryID)

Returns an integer index of the given address list in the address book search path (1 through Count). Raises an error if the address list is not in the search path.

AddressListOrEntryID -either RDOAddressList object or its entry id (string).

 

SetIndex(AddressListOrEntryID, Index)

Changes the order of the address list given by the AddressListOrEntryID parameter in the address book search path.

AddressListOrEntryId - either RDOAddressList object, its entry id (string) or an old integer index (1 to Count) of the address list.

Index - integer. New index of the address list.

'move the Contacts address list to the top of the search path

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set AddrList = Session.AddressBook.AddressLists.Item("Contacts")
Session.AddressBook.SearchPath.SetIndex(AddrList, 0)