Hi, I want to create a distribution list from contacts listed in MS Access. I
can create the distribution list contact item and fill with recipients so
that their name is actually their email address.
Unfortunitely this is not user friendly to review when compared with having
each recipient listed with their name and email address in separate
columns/fields. The following adds a recipient with the same value in the
name and email address fields. That is, name is someone@somewhere.co.nz and
email is someone@somewhere.co.nz
Set myOlDistList = myOlApp.CreateItem(olDistributionListItem)
myOlDistList.DLName = DistListName
Do Until rstDistList.EOF
Set myOlRecipient = myOlApp.Session.CreateRecipient(rstDistList!Email)
myOlRecipient.Resolve
myOlDistList.AddMember myOlRecipient
rstDistList.MoveNext
DoEvents
Loop
rstDistList.Close
myOlDistList.Save
myOlDistList.Display
I would like to create each recipient with the name of the contact and the
email address stored in the email field.
Any ideas or suggestions appreciated :-)
Many thanks, Jonathan
Call CreateRecipient passing the name in the format "Name
<user@example.com>"
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
> Hi, I want to create a distribution list from contacts listed in MS
> Access. I
[quoted text clipped - 29 lines]
>
> Many thanks, Jonathan
Jonathan - 16 Jul 2007 21:32 GMT
> Call CreateRecipient passing the name in the format "Name
> <user@example.com>"
[quoted text clipped - 3 lines]
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
Supurb, works like a charm!
Many thanks, Jonathan
> > Hi, I want to create a distribution list from contacts listed in MS
> > Access. I
[quoted text clipped - 29 lines]
> >
> > Many thanks, Jonathan