none
Display the Selected recipient property while clicking a button in my add-in RRS feed

  • Question

  • In my outlook add-in, I have overriding the senditems_itemsadded and showing my custom dialog before sending the mail to let the user to select/enter a folder name to which the mail should be moved. In that dialog, I am showing the list of recipients too. In case of a distribution list the user entered in the recipients, I want to show the member list by calling the property window of the recipient while the user hovers over/clicking the link button next to the user instead of closing my window and go to the compose window. Is that possible to call the property window of the address book entry?

    Thanks in advance.

    Friday, April 5, 2013 12:33 PM

Answers

  • Yes, it shows SMTP right in that screenshot that you posted.

    By DL I meant Distribution List, not an address type.

    If you know that it is supposed to be the DL and it is hosted by the Exchange server that hosts the mailbox in your profile, you can take the SMTP address and pass it to Application.Session.CreateRecipient. Call Recipient.Resolve, and if REcipient.AddressEntry.Type is EX, you have your Exchange entry.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, April 5, 2013 2:54 PM

All replies

  • No, you cannot display that window.

    The best you can do is the whole address entry properties dialog - Recipient.AddressEntry.Details


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, April 5, 2013 12:56 PM
  • Hi Mr.Streblechenko,

    Actually I want to show the window that is attached here.

    Contact Details

    The recipient's addressentry details will show the property of the email id but not the details of the distribution list (the members, owner, etc). I tried with Recipient.GetExchangeDistributionList.Details also but it thrown null reference error.

    Whether this window's MSO will help to display?

    Friday, April 5, 2013 1:53 PM
  • That is exactly what will be shown. What do you see if you call AddressEntry.Details?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, April 5, 2013 1:58 PM
  • It shows the provided dialog:

    Friday, April 5, 2013 2:17 PM
  • That is because the address entry is a one-off SMTP address entry, not a real EX type address entry.

    Does Outlook show that address entry as a DL when you double click on it?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, April 5, 2013 2:35 PM
  • When I tried to get the Type property, it is showing SMTP. It didn't tell either it is a DL or EX type.
    Friday, April 5, 2013 2:47 PM
  • Yes, it shows SMTP right in that screenshot that you posted.

    By DL I meant Distribution List, not an address type.

    If you know that it is supposed to be the DL and it is hosted by the Exchange server that hosts the mailbox in your profile, you can take the SMTP address and pass it to Application.Session.CreateRecipient. Call Recipient.Resolve, and if REcipient.AddressEntry.Type is EX, you have your Exchange entry.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, April 5, 2013 2:54 PM
  • It resolved the issue. Thanks Dmitry.
    Friday, April 5, 2013 3:13 PM