i'm developing an application that will allow users to send email to selected people.
They need to be able to select the users from the Outlook Global Addresslist.
I am able to loop through the existing users in the domain with the following code:
Private Sub cmdEmailAdd_Click()
Dim oAdrLst As Outlook.AddressList
Dim oAdrEnt As Outlook.AddressEntries
Dim oadrentry As Outlook.AddressEntry
Dim objApp As New Outlook.Application
Set oAdrLst = objApp.GetNamespace("MAPI").AddressLists("All Users") 'All Users on Domain
Set oAdrEnt = oAdrLst.AddressEntries
For Each oadrentry In oAdrEnt
Set oadrentry = Nothing
Set oAdrEnt = Nothing
Set oAdrLst = Nothing
Set objApp = Nothing
In the debu window all the names of the users in the All Users list are printed so that works OK and I am able to connect to the Outlook Addressbook.
Bu now I would like the Addressbook to appear and let the user select one or more adresses from the list and store them in a variable.
I do not know how to display the addressbook and I hope that someone here knows the answer.