Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I get an email address from the GAL

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I get an email address from the GAL

On Oct 8, 12:00*pm, Joel wrote:
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?- Hide quoted text -


- Show quoted text -


My GAL is very large.

I want a pop-up box that allows the user to select a name. I want to
return the name and smtp address of the selection.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default How can I get an email address from the GAL

Check out the SelectNamesDialog Object, which is available in Outlook
2007.

http://msdn.microsoft.com/en-us/library/bb176400.aspx

--JP

On Oct 8, 12:26*pm, Constantinetp wrote:

My GAL is very large.

I want a pop-up box that allows the user to select a name. *I want to
return the name and smtp address of the selection.- Hide quoted text -

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt the start of an email...user fills in email address gab1972 Excel Programming 2 July 16th 09 03:35 PM
Send data from Excel in email from specific email address Erik Excel Programming 5 December 5th 07 05:09 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM


All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"