PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WD23 - drag/drop attachement from Outlook
WD23 - drag/drop attachement from Outlook
Débuté par Arie, 15 aoû. 2018 21:49 - 8 réponses
Posté le 15 août 2018 - 21:49
Hi,

I;m using drag and drop in my application to let the user drag a file from the explorer into a window. And then import the file and attach it to a customer. Works great, I'm able to drag a copy of an ID-card for instance of an employee and save it in the database.


But when dragging an attachement directly from an Outlook message it does not work. I did some searching and it turns out that in this case the 'dragged object' is not a file, but some internal Microsoft object, not recognized by the WD framework.

Anyone has some info about this or a solution to catch these kind of objects?
Posté le 16 août 2018 - 16:26
Hi Arie,

perhaps my contribution can help the need for help for this issue, because I experience the same problem.

So indeed, I am also interested for the feedback.

Tonny
Posté le 16 août 2018 - 17:39
Hi,

Hmmm, not toally sure becasue I've never tried to do it, but on the face of it, it looks as though it's not possible with the functions as they stand.

Ok, so it's not WX but maybe this C# example can give some clues?
https://www.codeproject.com/Articles/7140/Drag-and-Drop-Attached-File-From-Outlook-and-ab

I've not tried it myself, but another method may be to look at 'simulating' dnd by using EmailSaveAttachment? If the dnd function still has the filename when the 'drop' occurs, then it should doable?
Posté le 16 août 2018 - 17:47
This little Outlook plugin solved my problem for now.
https://tonyfederer.github.io/OutlookFileDrag/

But this means each and every client has to install this and that's not the best solution. Some IT-guys will not allow me to do so.

I'd rather get this straight at the WD side.
Posté le 16 août 2018 - 20:07
I use an activex component to directly drop outlook messages into.
Posté le 16 août 2018 - 20:50
Iso,

would be nice to tell us which component that would be...
Posté le 21 août 2018 - 00:09
Iso

yes, can you tell us what is this activex component please?

thanks
Posté le 21 août 2018 - 16:50
Sorry Arie, i couldnt remember the name when i posted then forgot about it :(

I use 'Microsoft Web Browser' ActiveX

and use the this code to set the location:

AX_Email>>Navigate2("C:\Temp\")
Posté le 17 novembre 2023 - 12:52
Bonjour avez-vous un exemple d'utilisation du dl 'OutlookFileDrag' en vous remerciant

Hello do you have an example of using the dl 'OutlookFileDrag' thank you