Addresses

  • Thread starter Thread starter Oggy
  • Start date Start date
O

Oggy

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top