Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / April 2007

Tip: Looking for answers? Try searching our database.

GAL in combobox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joe schmo - 24 Apr 2007 16:22 GMT
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
Dmitry Streblechenko - 24 Apr 2007 19:53 GMT
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

> 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
joe schmo - 24 Apr 2007 20:40 GMT
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

> set GAL = Application.Session.AddressLists("Global Address List")
> for each AE in GAL.AddressEntries
[quoted text clipped - 9 lines]
> > address list?  Using exchange 2003, outlook2003.  Have searched a lot but
> > come up empty.  many thanks
Dmitry Streblechenko - 24 Apr 2007 21:44 GMT
"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

>I may need a bit more.  This doesn't seem to work in an Outlook form.  I
>put
[quoted text clipped - 16 lines]
>> > but
>> > come up empty.  many thanks
joe schmo - 26 Apr 2007 19:36 GMT
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!

> "Global Address List" is the name of the address list (the one you see in
> the address Book), not the name of the control.
[quoted text clipped - 26 lines]
> >> > but
> >> > come up empty.  many thanks
Dmitry Streblechenko - 26 Apr 2007 21:11 GMT
Call AddItem instead of setting the Text property.

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

> Thanks Dmitry, it worked with your help!
> the only problem now is instead of Debug.print I put in
[quoted text clipped - 35 lines]
>> >> > but
>> >> > come up empty.  many thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.