On 20/10/2010 4:46 PM, kc106_2005-wi...@yahoo.com wrote:
Unfortunately, the above code doesn't work.  CF_HDROP is not a format
GetClipboardData recognizes, and DragQueryFile returns None.  Anybody know what
the proper way of retrieving the dropped Outlook info?

I'm not sure what you mean by CF_HDROP not being recognized - it works for me. Using Windows Explorer, select a file and "copy" it to the clipboard. Then run the following script:

import win32clipboard, win32con
win32clipboard.OpenClipboard()
try:
    got = win32clipboard.GetClipboardData(win32con.CF_HDROP)
    print got
finally:
    win32clipboard.CloseClipboard()

You should get back a tuple listing the filenames on the clipboard. I'm not sure what outlook does here, but you may also like to copy the outlook object to the clipboard and run the win32com/demos/dump_clipboard.py script to see what can be found.

HTH,

Mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to