+ Reply to Thread
Results 1 to 1 of 1

How to identify the correct 'GAL' & its '.AddressLists.Item(number)' of a particular email

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Question How to identify the correct 'GAL' & its '.AddressLists.Item(number)' of a particular email

    Thread Title: "How to identify the correct 'GAL' and its '.AddressLists.Item(number)' of a particular email account in Outlook"

    Hi All

    I have a total of two different email accounts aligned with their 'Microsoft Exchange' (different domains) in my MS Outlook 2010 application. I have written a VBA code to identify the correct email account/ domain for my requirements. I run this code from Excel VBA window.

    It can find the correct email account/ domain, but unable to figure out the exact "Global Address List" of that particular email account, and this problem lead up to mismatch of the correct number for its '.AddressLists.Item(number)', and wrong results...

    I am new here, and very new to the Outlook automation, please help me.

    For Example: I have one email account - "[email protected]" and another is "[email protected]", and both are connected with their "Global Address List" via Mircosoft Exchange Servers.
    I have to only access GAL for my "[email protected]" account to identify User IDs/ Alias numbers and his/her Manager Name & Alias.

    I only know programmically that ".AddressLists.Item(16)" is located to this '@yahhoo.com' account in my Outlook application, so while running my codes I have to choose the exact Item() number by clicking on many msgbox(es), but how would other employee know their exact AddressList.Item() for their '@yahhoo.com' e-mail account.

    Set myAddressList = OutSess.Session.AddressLists.Item(9) ' ("Global Address List") for the first 'GAL' of '@gmmail.com'
    ' or
    Set myAddressList = OutSess.Session.AddressLists.Item(16) ' ("Global Address List") for the second 'GAL' of '@yahhoo.com'


    Please Note ---> The order/ sequence of email accounts and their ExchangeServers and AddressList.Item() can be differ in the Outlook application of every employee who runs this VBA program.

    Please Login or Register  to view this content.
    Please help me to make this programmically smart by using the account details.

    Thanks in advance!
    Last edited by SunOffice; 02-22-2013 at 01:53 AM.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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