From: scottb2 on

I'm using the following code to create a distribution list. Once the
list is created, I go to Contacts, click on the DL, and see that the DL
member has the email address for both the name and email addr fields.
How do I create a DL recipient that has the desired name field
(different from the email address)?

Thanks,
Scott


Code:
--------------------

oDL = oApp.CreateItem(Outlook.OlItemType.olDistributionListItem)
as Outlook.DistListItem;

tempItem = oApp.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
oRecipients = tempItem.Recipients;
oDL.DLName = "Associate Email Distribution List";
foreach (Outlook.ContactItem oContact in contactList)
{
oRecipients.Add(oContact.Email1Address);
}
resolveRet = oRecipients.ResolveAll();
oDL.AddMembers(oRecipients);
oDL.Save();
--------------------


--
scottb2
http://forums.slipstick.com