locked
Getting a list of the mail item recipients RRS feed

  • Question

  • I currently have a compose window with a button inside it.

    How can I get a list of the recipients in this format

    john@test.com, john@test2.com, james@test.com

    And also a separate list for CC if possible.


    • Edited by Darryl Bartlett Wednesday, December 23, 2015 5:44 PM Additional
    Wednesday, December 23, 2015 5:42 PM

Answers

  • Hello Darryl,

    Use the Address property of the Recipient class to get a string representing the e-mail address of the Recipient (see the Recipients property of the MailItem class which returns a collection that represents all the recipients for the Outlook item). The Type property will tell you olBCC, olCC, olOriginator, or olTo for MailItems.

    Also you can use the following properties of the MailItem class:

    CC - a String representing the display list of carbon copy (CC) names for a MailItem.

    BCC - a String representing the display list of blind carbon copy (BCC) names for a MailItem. 

    To - a semicolon-delimited String list of display names for the To recipients for the Outlook item.

    Note, these properties contain the display names only. The Recipients collection should be used to modify this property and to get the SMTP addresses of recipients.


    Wednesday, December 23, 2015 6:46 PM