I saw this code Euler about dragging and dropping attachments ( http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C ) from Outlook to Windows Form and it works fine in Windows Forms, but I I can not get it to work with WPF. I tried just changing System.windows.form.IDataObject to System.Windows.IDataObject, but it does not work (as I should have guessed).
I also just tried to get the contents of the e.Data FileContents file, but always get errors (which seems to apply to everyone when I check on the Internet).
Has anyone ever dragged an application from Outlook to WPF? I will completely lose.
Edit: I am not trying to get the file from Windows Explorer windows (but I know how to do it). This is really all that is connected with the attachment directly from Outlook, which does not work. I also fully understand that I could just transfer the file from Outlook to a temporary folder and then transfer it to my program, but I would like to avoid this, if possible, an extra step.
source
share