Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag-and-drop Outlook message into browser

I want to be able to drag and drop an Outlook message into the browser and fire a Javascript event that, for example, creates a link to the message using the message's GUID.

But I'm stuck at the first step—attempting to drag an Outlook message anywhere outside the folder list shows the not-allowed cursor.

I was about to give up, except I found some posts suggesting ways to enable the operation, e.g. How to drag and drop an email, from Outlook, into a .NET application?

Is there some way to make this possible? (Including writing a browser extension, though not ideal.)

like image 763
slackwing Avatar asked Feb 09 '16 15:02

slackwing


2 Answers

Free plugin solution for older browsers and older Outlook:

https://tonyfederer.github.io/OutlookFileDrag/

From the website:

When you try to drag and drop from Outlook, Outlook correctly identifies the format as virtual files (CFSTR_FILEDESCRIPTORW) since the files do not exist directly on disk. Instead, they are contained in a PST file, OST file, or on an Exchange server.

However, many applications do not support, such as web browers and most .NET/ Java applications.

To work around this issue, Outlook File Drag hooks the Outlook drag and drop process and adds support for physical files (CF_HDROP). When the application asks for the physical files, the files are saved to a temp folder.

I looked at https://outlook2web.com/ and https://www.wilutions.info/ddaddin-download.html

but this free one works just fine and it's open source.

Update regarding newer browsers and Outlook:

After updates to Outlook and the dataTransfer API, drag and drop functionality seems to be available in the latest versions of Chrome and Edge via the "items" property of the "dataTransfer" property of the "drop" event. You then have to iterate the items and check if they are files or not and then use them. However FireFox still seems to be incompatible with Outlook via this API. Not sure about other applications. Here is their bug: https://bugzilla.mozilla.org/show_bug.cgi?id=580928

You can vote for a bug in bugzilla if you have an account by expanding the details section of the page.

like image 58
ADJenks Avatar answered Oct 08 '22 18:10

ADJenks


Another solution (not free) is DDAddin. This works really well. The solution will add an Outlook add-in that converts the selected emails from HTML 5 to CF_HDROP so browsers can understand it.

Make sure to restart Outlook after installing the add-in. The link has more details on how to test the functionality but you can easily drag and drop an email to your browser to see it working.

like image 27
Moe Avatar answered Oct 08 '22 18:10

Moe