ref: vbMAPI_AddressBook

On this page you'll find:

    Class Description

    This object is a wrapper for the MAPI IAddrBook object.


    Property Get Properties() As vbMAPI_Properties

    Exposes a collection of the MAPI properties set on the address book.  The default member of the vbMAPI_Properties class is Item, therefore in VB you can call Object.Properties(PropTag) directly.

    Property Get NamedProperties(ByVal PropertySetGUID As String, _
                  ByVal ID As Variant, _
                  ByVal DataType As EnumMAPIPropDataTypes) As vbMAPI_Property

    Provides access to MAPI named properties for the address book.

    PropertySetGUID: A string representation of the property set GUID (e.g. )
    ID: The name (string) or property identifier (integer) representing the property to query from the property set.
    DataType: The MAPI data type of the property.

    Property Get AddressLists(Optional ByVal ShallowTraversal As Boolean) As vbMAPI_AddressLists

    Provides an object for enumerating the available address lists.

    Property Get PAB() As vbMAPI_AddressList

    Returns an object exposing the Personal Address Book (PAB).

    Property Get DefaultAddressList() As vbMAPI_AddressList

    Returns an object exposing the default address list.

    Property Get GAL() As vbMAPI_AddressList

    Returns an object exposing the Global Address List (GAL).

    Function GetAddressEntryFromID(ByVal EntryID As String) As vbMAPI_AddressEntry

    Given a valid address entry EntryID in hex form, returns an vbMAPI_AddressEntry object.

    Function GetAddressListFromID(ByVal EntryID As String) As vbMAPI_AddressList

    Given a valid address list EntryID in hex form, returns an vbMAPI_AddressList object.

    Function ResolveName(ByVal Name As String, _
                  Optional ByVal ShowDialog As Boolean, _
                  Optional ByVal ParentWindowHandle As Long) As vbMAPI_AddressEntry

    Resolves the given Name using the address book, returning an vbMAPI_AddessEntry object if a single match is found.

    ShowDialog: If True, will cause the MAPI/Outlook name resolution dialog to be displayed if necessary.
    ParentWindowHandle: HWND handle to the parent window.

    Function ResolveNameEx(ByVal Name As String) As vbMAPI_AddressEntries

    Resolves the given Name using the address book, returning multiple matches inside an vbMAPI_AddressEntries object.  The search ends as soon as a match, or several matches, are found in an address list (further address lists are not searched).

    Function ShowAddressBook(Optional ByVal InitialRecipients As vbMAPI_Recipients, _
                  Optional ByVal Title As String, _
                  Optional ByVal OneAddress As Boolean, _
                  Optional ByVal ForceResolution As Boolean = True, _
                  Optional ByVal NumRecipGroups As Long = &Hffffffff, _
                  Optional ByVal ToCaption As String, _
                  Optional ByVal CcCaption As String, _
                  Optional ByVal BccCaption As String, _
                  Optional ByVal ParentWindowHandle As Long) As vbMAPI_Recipients

    Displays the address book modally and returns the selected recipients within an vbMAPI_Recipients collection.  All parameters are optional.

    InitialRecipients: you can pass in an existing vbMAPI_Recipients collection here.
    Title: the title of the address book dialog.
    OneAddress: If True, allows only a single recipient to be selected.
    ForceResolution: If True, forces all recipients to be resolved before returning.
    NumRecipGroups: Number of recipient groups to be displayed (1 = To, 2 = To/CC, 3 = To/CC/BCC)ToLabel: The caption for the To label, if displayed.
    CcLabel: The caption for the Cc label, if displayed.
    BccLabel: The caption for the BCC label, if displayed.
    ParentWindowHandle: HWND handle to the parent window.

    Property Get MAPIOBJECT() As Variant

    Returns the IAddrBook object associated with this item.