Drag and drop just an attachment from an email to an Outlook Add-In?

Add-in Express™ Support Service
That's what is more important than anything else

Drag and drop just an attachment from an email to an Outlook Add-In?
 
erosal




Posts: 16
Joined: 2013-09-09
I have an MS Outlook add-in that includes a tree display showing a series of back-end system objects. Currently, I can drag and drop an email on top of one of those objects, saving the email (and any associated attachments) to the back-end system's documents table with a link to the appropriate back end object.

Outlook will let me drag an individual attachment onto one of the back-end objects as well, but the result is still to save the entire email message with all attachments. Is there a way to recognize that the object I'm dragging in an attached document, not an entire email, and just save it to the back-end?

Thanks!

-- Tony
Posted 26 Aug, 2015 08:11:03 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Tony,

The Outlook 2010 Object Model contains the AttachmentSelection property:
https://msdn.microsoft.com/en-us/library/office/ff869315%28v=office.14%29.aspx

You can check the AttachmentSelection.Count property and if it is >= 0 then the user selected some attachment(s).
Posted 26 Aug, 2015 08:25:48 Top