View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How can I get an email address from the GAL

This code wil get the gloabal address list. My global List is very long so
I'm not sure how big you list is and what type object do you want to display
the list.

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myAddressList = myNameSpace.AddressLists("Global Address List")
Set myAddressEntries = myAddressList.AddressEntries


"Constantinetp" wrote:

I have code attached to a macro button that opens the Global Address
List address book and allows the user to select a name. I then use
that name to send an email to the user. It works great in Excel '03,
but since it uses a CDOsession the code fails in Excel '07.

Can anyone point me to a method to get the GAL without using CDO?