Absolutely awesome - I would give you FIVE stars if I could!
Wow! Thanks!
Now the tough question ... do you have any ideas how a VFP could read files pasted to the clipboard by other apps? In other words, continuing with your scenario - if a user copied an attachment from an email application to the clipboard, how could our VFP app recognize and process that file?
Sure.
The main structure for my code came from this page:
which illustrates how to use GetClipboardData to get RTF data off the clipboard... just get CF_HDROP instead.
Also, does your tip work with multiple files or only a single file?
It supports just one file at a time.

Oh, wait, No it does support multiple files
My initial testing made me conclude that the Clip type needed to be "Shell IDList Array" to do multiple files... I now see that it doesn't: you can use "CF_HDROP" for multiple files, and therefore my code (without any changes at all

) simply by seperating the file names with CHR(0).
It puts a funky value into FileName and FileNameW, though: they only support one filename at a time. Fortunately, Email programs seem to use CF_HDROP. Maybe I'll adjust my faq to accept an array and behave properly, putting just the first file into "FileName" and "FileNameW"...
- Bill
Get the best answers to your questions -- See FAQ481-4875.