A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

GAL in combobox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 24th 07, 05:22 PM posted to microsoft.public.outlook.program_vba
joe schmo
external usenet poster
 
Posts: 8
Default GAL in combobox

Is there any way to make a combobox and list the users from the Global
address list? Using exchange 2003, outlook2003. Have searched a lot but
come up empty. many thanks
Ads
  #2  
Old April 24th 07, 08:53 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default GAL in combobox

set GAL = Application.Session.AddressLists("Global Address List")
for each AE in GAL.AddressEntries
Debug.Print AE.Name
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Is there any way to make a combobox and list the users from the Global
address list? Using exchange 2003, outlook2003. Have searched a lot but
come up empty. many thanks



  #3  
Old April 24th 07, 09:40 PM posted to microsoft.public.outlook.program_vba
joe schmo
external usenet poster
 
Posts: 8
Default GAL in combobox

I may need a bit more. This doesn't seem to work in an Outlook form. I put
this code in the Form script editor and changed "global address list" to
combobox3, but it doesn't populate. Do I need to specify the exchange
server, or am I missing something? thanks for any more help

"Dmitry Streblechenko" wrote:

set GAL = Application.Session.AddressLists("Global Address List")
for each AE in GAL.AddressEntries
Debug.Print AE.Name
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Is there any way to make a combobox and list the users from the Global
address list? Using exchange 2003, outlook2003. Have searched a lot but
come up empty. many thanks




  #4  
Old April 24th 07, 10:44 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default GAL in combobox

"Global Address List" is the name of the address list (the one you see in
the address Book), not the name of the control.
Replace the Debug.Print line with the code that explicitly populates your
combo box items.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
I may need a bit more. This doesn't seem to work in an Outlook form. I
put
this code in the Form script editor and changed "global address list" to
combobox3, but it doesn't populate. Do I need to specify the exchange
server, or am I missing something? thanks for any more help

"Dmitry Streblechenko" wrote:

set GAL = Application.Session.AddressLists("Global Address List")
for each AE in GAL.AddressEntries
Debug.Print AE.Name
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Is there any way to make a combobox and list the users from the Global
address list? Using exchange 2003, outlook2003. Have searched a lot
but
come up empty. many thanks






  #5  
Old April 26th 07, 08:36 PM posted to microsoft.public.outlook.program_vba
joe schmo
external usenet poster
 
Posts: 8
Default GAL in combobox

Thanks Dmitry, it worked with your help!
the only problem now is instead of Debug.print I put in combobox3.text=AE.Name
Now the only name that shows is the last name in the alphabet. Any way to
list them all in the drop down? thanks a alot!


"Dmitry Streblechenko" wrote:

"Global Address List" is the name of the address list (the one you see in
the address Book), not the name of the control.
Replace the Debug.Print line with the code that explicitly populates your
combo box items.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
I may need a bit more. This doesn't seem to work in an Outlook form. I
put
this code in the Form script editor and changed "global address list" to
combobox3, but it doesn't populate. Do I need to specify the exchange
server, or am I missing something? thanks for any more help

"Dmitry Streblechenko" wrote:

set GAL = Application.Session.AddressLists("Global Address List")
for each AE in GAL.AddressEntries
Debug.Print AE.Name
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Is there any way to make a combobox and list the users from the Global
address list? Using exchange 2003, outlook2003. Have searched a lot
but
come up empty. many thanks






  #6  
Old April 26th 07, 10:11 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default GAL in combobox

Call AddItem instead of setting the Text property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Thanks Dmitry, it worked with your help!
the only problem now is instead of Debug.print I put in
combobox3.text=AE.Name
Now the only name that shows is the last name in the alphabet. Any way to
list them all in the drop down? thanks a alot!


"Dmitry Streblechenko" wrote:

"Global Address List" is the name of the address list (the one you see in
the address Book), not the name of the control.
Replace the Debug.Print line with the code that explicitly populates your
combo box items.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
I may need a bit more. This doesn't seem to work in an Outlook form. I
put
this code in the Form script editor and changed "global address list"
to
combobox3, but it doesn't populate. Do I need to specify the exchange
server, or am I missing something? thanks for any more help

"Dmitry Streblechenko" wrote:

set GAL = Application.Session.AddressLists("Global Address List")
for each AE in GAL.AddressEntries
Debug.Print AE.Name
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"joe schmo" wrote in message
...
Is there any way to make a combobox and list the users from the
Global
address list? Using exchange 2003, outlook2003. Have searched a
lot
but
come up empty. many thanks








 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2k3 Script: Pb Using ComboBox bbnimda Outlook and VBA 3 December 1st 06 05:54 PM
ComboBox Values dch3 Outlook - Using Forms 7 November 15th 06 02:40 PM
CommandBarControl ComboBox Renjith Outlook - General Queries 0 July 10th 06 12:47 PM
combobox from field HDI Outlook - Using Forms 0 June 27th 06 09:47 PM
automatic from combobox thtsps Outlook - Using Forms 1 February 27th 06 02:44 PM


All times are GMT +1. The time now is 07:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.