Retrieving Email Address from Outlook Global Address Book

Is there a way to retrieve the email address that is posted in the Outlook global address book?
Going to outlook and address book I can look up a contact name and then click on the email addresses button and then be able to view the smtp email address for any contact. Can I create a sub routine in Visual Basic for Access to automatically update my client tables eamil address list from this?

Popular White Paper On This Topic

There is code to do this. Theer may be some in our archive, and it is worth
looking. Google may also help you find it. But expect that any interprocess
communication like Access-Outlook will be exciting before it works properly.

There is an unbelievable easy way to do this:
In Outlook do an export from the folder, and select Excel (or Text) file you
want to export to. After entering the new file name for the exported data,
accept the default for field mapping (no changes needed). Everything about
an Outlook record will be exported.
Once it's done, open the Excel file and delete the not needed columns. There
is only one thing is not nice about it: only the display name will be shown,
and if someone used only a first name as display name, it will be hard to
identify the person. But all email addresses will be there.

Thanks for that input however, the address book I am looking for is the global one not the contacts one in my folder. I can not export the global one, at least not without doing something more to view it from the export listing. Do you know how I can do this=3F

I dont know if this will help you.
In this piece of code I get an address and open and email...
Take a look to the code . Maybe you get something from it in your benefit.
Change the number in the piece of code getdefaultcode(x) and maybe you get
something
--------------------
Sub PRU()
Dim str As String
Dim fs As ContactItem
Dim dir As AddressEntries
On Error Resume Next
'Create outlook object
Set myOlApp =3D CreateObject("Outlook.Application")
Set mynamespace =3D myOlApp.GetNamespace("MAPI")
'To open my contacts folder
Set mycontacts =3D mynamespace.GetDefaultFolder(10)
For Each fs In mycontacts.Items
str =3D "Josefina G=F3mez(e-mail"
If fs.Email1DisplayName =3D str Then
Set myItem =3D myOlApp.CreateItem(olMailItem)
With myItem
.Body =3D "Here you have the.... " & MonthName(Month((Date)))
.Subject =3D "THis is the report of " & UCase(MonthName(Month((Date))))
.To =3D fs.Email1Address
End With
myItem.Display
'myItem.Send
End If
Next fs
Set myItem =3D Nothing
Set myOlApp =3D Nothing
End Sub

Have you tried getting what you need by using a table link to Exchange? That is, use the File ~ Get External Data ~ Link Tables command and choose Exchange() from the list. If it is not there you may have to install optional items from the Office install. Once you use the Exchange connector, you
will see the GAL and other exchange generated lists available for attachment.

The email address is in ldap form but can be used as an email address, I have used this method for years.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.