View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Elink John Elink is offline
external usenet poster
 
Posts: 5
Default Is it possible to create distribution list for Outlook?

Hi there

I have Excel file with names (1st column) and e-mail addresses (2nd
column). If I want to add all these names into the Outlook's Contact
list, there is no problem. I use something like as follows
*********************
Set olApplication = CreateObject("Outlook.Application")
Set olNameSpace = olApplication.GetNameSpace("MAPI")
Set olContactFolder =
olNameSpace.GetDefaultFolder(olFolderContacts)
Set olContactItem = olContactFolder.Items.Add
With olContactItem
.LastName = *****here I read from file
.Email1Address = *****here I read from file
.Save
End With
**********************
it creates new item in Contact.

My question is - is it possible to create NEW DISTRIBUTION LIST using
macro? I mean all names/e-mail addresses from the Excel file will be
stored in the new distribution list in Outlook, so these new contacts
will not be mixed with my "normal" contacts

Thank you very much for all comments.

Cheers
Johny