![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]() 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.olDistributionL istItem) 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
unable to export Outlook 2007 address book email address | Amy Jones | Outlook - General Queries | 24 | January 24th 10 08:59 PM |
Can't get SMTP address of contact that shares email address of an Exchange user | Jeff | Outlook and VBA | 14 | January 15th 09 12:50 AM |
Outlook Address Book requires non-blank email address??? | Chris Miller[_2_] | Outlook - General Queries | 6 | August 21st 08 12:14 AM |
How do I make a new email address supercede an old email address? | dhbirt | Outlook - Using Contacts | 3 | May 13th 06 04:38 AM |
Set which local email account can send mail to contacts in address book. (associating an email address with a contact) | Scott Streit | Outlook - General Queries | 3 | January 27th 06 02:57 PM |