Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import contacts in a distribution list

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
0
0
US
Client would like to take contacts from a distribution list and import to excel. I have not figured out a way to do anything with a distribution list other than email. How do I import those contacts or select them to put them in a category, or mail merge them from Outlook.

Thanks,

Dawn

 
Try modify this

Public Function GetContact()
Dim olApp As Outlook.Application
Dim contacts As Outlook.MAPIFolder
Dim listContact As Outlook.Recipient
Dim distList As Outlook.DistListItem
Dim i As Integer

Set olApp = New Outlook.Application
Set contacts = olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
Set distList = contacts.Items("Your Distribution List")

For i = 1 To distList.MemberCount
Set listContact = distList.GetMember(i)
Debug.Print listContact.Address
Next

Set listContact = Nothing
Set distList = Nothing
Set contacts = Nothing
Set olApp = Nothing


End Function

Regards

Peachmelba
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top