AddressLists Collection Object

The AddressLists collection object contains one or more AddressList objects.

At a Glance

Specified in type library: CDO.DLL
First available in: CDO Library version 1.1
Parent objects: Session
Child objects: AddressList
Default property: Item

An AddressLists collection is considered a small collection, which means that it supports count and index values that let you access an individual AddressList object through the Item property. The AddressLists collection supports the Microsoft® Visual Basic® For Each statement. For more information on collections, see Object Collections.

Properties


Name
Available since version
Type

Access
Application 1.1 String Read-only
Class 1.1 Long Read-only
Count 1.1 Long Read-only
Item 1.1 AddressList object Read-only
Parent 1.1 Session object Read-only
Session 1.1 Session object Read-only

Methods

(None.)

Remarks

The AddressLists collection provides access to the root of the MAPI address book hierarchy for the current session. You can obtain the collection through the parent Session object's AddressLists property.

You can use the Count and Item properties to traverse the hierarchy for all available address books, or you can use the Item property to select a particular AddressList object. The type of access you obtain depends on the access granted to you by each available address book provider.

Each AddressList object represents one MAPI address book container. The AddressLists collection contains only those AddressList objects that contain recipients, and not those containing only subcontainers. For more information on the different types of containers, see the description of the PR_CONTAINER_FLAGS property in the MAPI Programmer's Reference.