Results 1 to 8 of 8

Read details from Global Address Book in Outlook into Excel

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Read details from Global Address Book in Outlook into Excel

    I use the following code to read information from the Global Address Book in Outlook, and it works. Do any of you know how I can read the Email-address and alias-Name as well? By other word more information from each record. The code below will give me the name only.

    Sub GetOutlookAddress()
        Dim outApp As Object, outNS As Outlook.Namespace
        Dim myAddressList As Outlook.AddressList
         
        Set outApp = CreateObject("Outlook.Application")
        Set outNS = outApp.GetNamespace("MAPI")
        Set myAddressList = outNS.Session.AddressLists("Global Address List")
         
        For Each AddressEntries In myAddressList.AddressEntries
            i = i + 1
            Debug.Print myAddressList.AddressEntries(i)
        Next AddressEntries
         
        Set outApp = Nothing
         
    End Sub
    Last edited by mkvassh; 01-27-2010 at 04:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1