Drag and Drop to Browser from Outlook

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

Only registered users are allowed to subscribe.
Drag and Drop to Browser from Outlook
Dragging mail items from outlook to browser file storage. 
Subscribe
Kyle Johnson




Posts: 7
Joined: 2016-10-21
I am currently trying to find a way to create an add-in to outlook that when a mail item is dragged and dropped inside of a web file storage, like dropbox, it will grab the .msg file and all attachments associated with the email item that was dropped. Currently outlook drop doesn't use the "standard" CF_HDROP for files dropped onto a site like this and it does not have any files in the event data transfer object. Is there a way to when a drag event starts to grab or create all the files and attach them to an event such as the drop event on a browser so that I could directly upload them? Currently I have to drag to desktop or folder and then drag to browser. I found examples in the forums for handling this on a windows form or when dropping on a section inside of outlook itself but those solutions do not work for my case. Personally I'd like for outlook to have this functionality innately.

Thanks for any help.
Posted 12 Dec, 2017 14:40:54 Top
Andrei Smolin


Add-in Express team


Posts: 14300
Joined: 2006-05-11
Hello Kyle,

Kyle Johnson writes:
Currently I have to drag to desktop or folder and then drag to browser.


That is, the Windows Explorer finds the required data among those dropped onto the desktop. This may also mean the problem is on the web browser side (in your web application?).

Another possibility is Outlook and the browser running on different integrity levels. Check if the issue occurs if you start Outlook from the Start Menu, not by debugging your add-in from the elevated IDE. If this issue is caused by different integrity levels, pay attention that IE runs on the low integrity level by default.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Dec, 2017 06:31:14 Top
Kyle Johnson




Posts: 7
Joined: 2016-10-21
The same thing happens with or without me debugging my add-in. In my research I have found that there is no browser that natively handles dragging and dropping mail items from outlook as it does not have any items in the event.datatransferitem.files. Same goes for outlook not handling the dragging and dropping of its mailitems into a browser. I know that the type of dropped file onto browser isn't the expected CF_HDROP type. Outlooks item drop type is CFSTR_FILECONTENTS/CFSTR_FILEDESCRIPTOR which are not appropriate drop types for browser to handle on dragdrop event.
Posted 13 Dec, 2017 09:33:18 Top
Andrei Smolin


Add-in Express team


Posts: 14300
Joined: 2006-05-11
Hello Kyle,

You can connect to running Outlook using Automation. If you can't do this right from the browser, consider using a broker application that could do this. Note my comments above about different integrity levels.

When you have an Outlook.Application object representing the running Outlook application, you'll be able to get the Explorer object representing the active Explorer window, retrieve the Explorer.Selection property, study the Outlook items selected and retrieve the information required.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Dec, 2017 08:12:22 Top
Kyle Johnson




Posts: 7
Joined: 2016-10-21
Andrei Smolin writes:
If you can't do this right from the browser, consider using a broker application that could do this


What do you mean by broker application? I am unfamiliar with this term.
Posted 21 Dec, 2017 10:27:17 Top
Andrei Smolin


Add-in Express team


Posts: 14300
Joined: 2006-05-11
Hello Kyle,

Broker application is an application started by the add-in to perform the tasks that the add-in cannot perform e.g. because of restrictions imposed by the integrity level. The add-in and broker app create a communication channel (e.g. using named pipes). Add-in Express for Internet Explorer provides such a broker as part of the infrastructure created for your IE add-on.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Dec, 2017 07:29:00 Top