|
-
June 22nd, 2001, 10:40 AM
#1
URGENT: ADRESS LIST
I have a combo box where i want the user to select a name address in my global adress list.
How can i get all the names of my address list to add it in the combo?
I already look for this, but only get information of displaing folders, messages, and x validations...
tks
JP- I rate all the help
-
June 22nd, 2001, 01:23 PM
#2
Re: URGENT: ADRESS LIST
What is global address list? Is it a list box or what?
Iouri Boutchkine
[email protected]
-
June 22nd, 2001, 10:08 PM
#3
Re: URGENT: ADRESS LIST
Hello:
If I understand you correctly, what you can do is put global addresses into a database and use ADO to get information from Combo:
Do Until Adodc1.Recordset.EOF
Combo1.AddItem (Adodc1.Recordset.Fields(1).Value)
Adodc1.Recordset.MoveNext
Loop
Good Luck
-
June 25th, 2001, 03:01 AM
#4
Re: URGENT: ADRESS LIST
No. I really want to get all names in my Outlook Global Adress List.
-
June 25th, 2001, 03:05 AM
#5
Re: URGENT: ADRESS LIST
No Iouri. I really want to get all the names in my Outlook Global Adress List and put him in a combo box. I just dont know how can i do this.
-
June 25th, 2001, 10:21 AM
#6
Re: URGENT: ADRESS LIST
hello,
u should user the Microsoft Outlook Object Library.
Dim myNameSpace As Outlook.NameSpace
Set myNameSpace = Application.GetNameSpace("MAPI")
Dim myGAddressList as Outlook.AddressList
Set myGAddressList = myNameSpace.AddressLists _("Global Address List")
Dim myAddressEntries As Outlook.AdressEntries
Set myAddressEntries= myAddressList.AddressEntries
For i=1 to myAddressEntries.Count
Combo1.AddItem (myAddressEntries.Item(i).Name)
Next i
Perhaps it will helo u.
Jens-Uwe
-
June 26th, 2001, 05:15 AM
#7
Re: URGENT: ADRESS LIST
Tks Jens-Uwe,
Was a nice tip, however i had to create a application object. Worked like this:
Dim myOlapp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myGAddressList As Outlook.AddressList
Dim myGAddressEntries As Outlook.AddressEntries
Set myOlapp = CreateObject("Outlook.Application")
Set myNameSpace = myOlapp.GetNamespace("MAPI")
Set myGAddressList = myNameSpace.AddressLists("Global Address List")
Set myGAddressEntries = myGAddressList.AddressEntries
For i = 1 To myGAddressEntries.Count
cmbEmail.AddItem (myGAddressEntries.Item(i).Name)
Next i
Tks again.
JP- I rate your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|