No, a distribution list is a single Outlook item that contains either
one-off email addresses or pointers to contact items stored in a folder.
What you're talking about is a contacts folder.
You don't need code to work with it, just select all the items in the folder
and use the New Message to Contact command to create a new message to all
those people.
If you do want to write code for such a simple task, use the addresses to
build a string that you use to set the value of the To property on the
message.
Sue Mosher
"Joel" <Joel> wrote in message
news:359F429E-9876-4772-821A-063E185277B0@microsoft.com...
> Isn't a ddistribution list all the memberos of a contact list? I trying
> to
> send an email to a list of people at my company that will be the same
> every
> week. What is the best way to get this list into the To: box of the
> email.
> I already have the email and just need to fill in the lisdt of people.
> "Sue Mosher [MVP]" wrote:
>
> > I don't see anything in this code that relates to attaching a
> > distribution
> > list to a message. Maybe you could clarify what you're trying to do and
> > give
> > your Outlook version.
>
>> Also, no distribution list appears to be involved. Instead, your code
> > appears to do something with contacts in a particular folder.
>
>> "Joel" <Joel> wrote in message
> > news:A04725E8-A78F-4257-B072-FBAFE2A4B689@microsoft.com...
> > > Why doesn't this code work. I only cna get one item from the
> > > distribution
> > > list
> >> > Set myNameSpace = OutApp.GetNamespace("MAPI")
> > > Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
> > > Set myContactList = myFolder.Folders(DistListName)
> > > For Each contact In myContactList.Items
> >> > Email = contact.Email1DisplayName
> > > Next contact
> >> > I'm trying to attach a distribution list to a new email message and
> > > can't
> > > figure this out.
>
>
>>