PC Review


Reply
Thread Tools Rate Thread

How can I get an email address from the GAL

 
 
Constantinetp
Guest
Posts: n/a
 
      8th Oct 2009
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?
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      8th Oct 2009
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?
>

 
Reply With Quote
 
Constantinetp
Guest
Posts: n/a
 
      8th Oct 2009
On Oct 8, 12:00*pm, Joel <J...@discussions.microsoft.com> 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?- Hidequoted 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.
 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      8th Oct 2009
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 <ctpou...@southernco.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using security group email address as default reply email address =?Utf-8?B?dHJhY3lseW5uNDEz?= Microsoft Outlook Discussion 0 23rd Oct 2007 10:00 PM
Send Email from Access changing email address in From to be different than sending address tomlebold@msn.com Microsoft Access 0 7th Dec 2006 08:44 PM
Replacing sender email address by distribution list email address ? Xavier Microsoft Outlook Discussion 2 3rd May 2006 12:33 PM
Set which local email account can send mail to contacts in address book. (associating an email address with a contact) Scott Streit Microsoft Outlook 3 27th Jan 2006 02:57 PM
Internet email reply address showing internal email address =?Utf-8?B?S0xZb3VuZw==?= Microsoft Outlook Discussion 3 25th Feb 2004 01:34 AM


Features
 

Advertising
 

Newsgroups
 


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