A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Addresses



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 7th 07, 02:34 PM posted to microsoft.public.outlook.program_vba
Oggy
external usenet poster
 
Posts: 18
Default Addresses

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

Ads
  #2  
Old April 9th 07, 08:20 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Addresses

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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two addresses Hell's Angel Outlook Express 1 March 29th 07 08:30 PM
Web Addresses MsContessa Outlook Express 3 December 24th 06 10:53 AM
Convert msg addresses to pst A McIntyre Outlook - Using Contacts 2 October 10th 06 10:01 PM
remove addresses Sandy Outlook - Using Contacts 1 August 31st 06 10:16 PM
Addresses don't appear Teacher Janet Outlook - Using Contacts 1 January 8th 06 11:52 PM


All times are GMT +1. The time now is 11:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.