Search code examples
c#outlookoutlook-addin

How to obtain MailItem from Explorer object


I need to be able to get the selected MailItem and save on the local hard-drive it while the client is in preview model (i.e. before the user double clicks and opens the email). So I suspect that I need to get the MailItem from the Explorer object but am not sure how. Any help would be appreciated.


Solution

  • Use Explorer.Selection collection to get all selected items. Explorer can be retrieved from Application.ActiveExplorer.