![]() |
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 have a folder hierarchy of Public folders ...All Public Folders ......Dept .........Distribution List Distribution List has a DefaultItemType of "olContactItem" and a DefaultMessageClass of "IPM.Contact". I have scanned the folder chain and have a Folder object for "Distribution List" if that helps. I wish to take a list of Contacts and create a distribution list in "Distribution List", of course :-) I understand that a DL contains only a name and email address but my requirement is that the user be able to see all of the contact information when clicking on a DL member. Any help to accomplish this is appreciated. My attempt is at the end of this message. Thanks, Scott Code: -------------------- Outlook.DistListItem oDL; Outlook.MailItem tempItem; Outlook.Recipients oRecipients; bool resolveRet; 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 |
Ads |
#2
|
|||
|
|||
![]()
I'm not sure what you're asking. If you double-click on a member of a DL
when the DL is opened that should open the contact representing that DL member. You do need to double-click to open the contact. When you have the contact from your list you need to create a Recipient object to add to the DL. You can either use the NameSpace.CreateRecipient() method to do that or you can create a dummy email and add the contact information to that to create the recipient object by using dummyEmail.Recipients.Add(). Once you have your recipient from the contact you use that to add a new DL member. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "scottb2" scottb2.47bklm@invalid wrote in message news:scottb2.47bklm@invalid... I have a folder hierarchy of Public folders ..All Public Folders .....Dept ........Distribution List Distribution List has a DefaultItemType of "olContactItem" and a DefaultMessageClass of "IPM.Contact". I have scanned the folder chain and have a Folder object for "Distribution List" if that helps. I wish to take a list of Contacts and create a distribution list in "Distribution List", of course :-) I understand that a DL contains only a name and email address but my requirement is that the user be able to see all of the contact information when clicking on a DL member. Any help to accomplish this is appreciated. My attempt is at the end of this message. Thanks, Scott Code: -------------------- Outlook.DistListItem oDL; Outlook.MailItem tempItem; Outlook.Recipients oRecipients; bool resolveRet; 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 |
Outlook Distribution List contents | scottb2 | Outlook - General Queries | 1 | March 4th 10 06:43 PM |
embedded distribution list to new distribution list in outlook | Brad Tulin | Outlook - Using Contacts | 2 | October 22nd 08 02:20 AM |
how do I export contents of a distribution list to Excel? | DAVID FREEBAKER | Outlook - Using Contacts | 1 | June 26th 08 12:13 PM |
Why do distribution list contents delete? | pwaldon | Outlook - Using Contacts | 2 | July 11th 07 11:29 PM |
How to create a distribution list based on contents of a text file | yjwonder | Outlook - Using Contacts | 1 | January 9th 06 11:12 PM |