All loaded address books in Outlook are available through the AddressLists
collection. If you know the name of the contact, you can retrieve an
AddressEntry object for that person with the following code:
Dim myNameSpace As Outlook.NameSpace
Dim myAddressList As Outlook.AddressList
Dim myAddressEntries As Outlook.AddressEntries
Dim myAddressEntry As Outlook.AddressEntry
Set myNameSpace = Application.GetNamespace("MAPI")
Set myAddressList = myNameSpace.AddressLists("Contacts")
Set myAddressEntries = myAddressList.AddressEntries
Set myAddressEntry = myAddressList.AddressEntries("John Doe")
Debug.Print myAddressEntry.Name & " - "; myAddressEntry.address
--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog:
http://blogs.officezealot.com/legault/
"Oggy" wrote:
Hi
Can anyone please advise me how i can insert a name and address from
the microsoft address book into a exel spreadsheet. If this cannot be
done what alternitives are there?
Thanks
Oggy