+ Reply to Thread
Results 1 to 8 of 8

Read details from Global Address Book in Outlook into Excel

  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.

    Please Login or Register  to view this content.
    Last edited by mkvassh; 01-27-2010 at 04:03 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Read details from Global Address Book in Outlook into Excel

    Depends exactly what you want. I assume from your mention of alias that you are talking about an Exchange server? If so, something like this:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

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

    Re: Read details from Global Address Book in Outlook into Excel

    Thanks. What I need is all names, userid and Email in the Global Address Book in the company where I am working. I can view all this and more if I view a contact in Oultook. If I run my macro will it only list names, nothing more. If I run your macro will it stop at the line below and give me run time error 438 "Object doesn't support this property or method. Any idea what I should do?
    With myAddressList.AddressEntries(i).GetExchangeUser

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Read details from Global Address Book in Outlook into Excel

    Sorry - I misread your office version. The ExchangeUser object was added in 2007.

    I don't know how to get that sort of data from Outlook (it's not my area), but I would probably bypass it anyway and use ADO with an LDAP query (since I think you are looking at ActiveDirectory properties as much as anything) - something along the lines of :

    Please Login or Register  to view this content.

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

    Re: Read details from Global Address Book in Outlook into Excel

    Thank you :-)

  6. #6
    Registered User
    Join Date
    08-29-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Read details from Global Address Book in Outlook into Excel

    Hello,

    It appears the command you show above would simply pull every address available, correct? Where/How can I supply a variable/cell reference, within that command, to return specific email address data based on the names I have stored in my existing workbook.

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Read details from Global Address Book in Outlook into Excel

    Hello cmwhite87, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

  8. #8
    Registered User
    Join Date
    02-03-2014
    Location
    Tampa. FL
    MS-Off Ver
    2007
    Posts
    1

    Re: Read details from Global Address Book in Outlook into Excel

    I found romperstomper's post extremely helpful. I found a website that seems to enumerate the available fields if someone wanted to expand romperstomper's SQL query.
    http://www.kouti.com/tables/userattributes.htm

    Using the information from that website one can change
    Please Login or Register  to view this content.
    to something like
    Please Login or Register  to view this content.
    where the title and department for each user will also be copied.

+ Reply to Thread

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