[python-win32] Drag and Drop from Outlook

Mark Hammond skippy.hammond at gmail.com
Sat Oct 23 01:47:12 CEST 2010


On 21/10/2010 4:27 PM, kc106_2005-win32 at yahoo.com wrote:
> Thanks for the reply, Mark.
>
> I did a "copy" from Outlook, and then run dump_clipboard.  Here's what comes up:
>
...

> Traceback (most recent call last):
>    File "C:\Python25\Lib\site-packages\win32com\demos\dump_clipboard.py", line 61
> , in<module>
>      DumpClipboard()
>    File "C:\Python25\Lib\site-packages\win32com\demos\dump_clipboard.py", line 32
> , in DumpClipboard
>      medium = do.GetData(fetc_query)
> pywintypes.com_error: (-2147024882, 'Not enough storage is available to complete
>   this operation.', None, None)

Bugger :)  Try modifying the script so that the COM error in line 32 is 
ignored and re-running it.

> Now, if I drag a message from Outlook and drop it onto a wxpython application
> and then run dump_clipboard.py.  Here's what I got:
>
> Dumping all clipboard formats...
> Clipboard format 49161
>   ->  got 4 bytes via HGLOBAL
>   ->  got 4 bytes via IStream
> Clipboard format 49655
>   ->  got 36 bytes via HGLOBAL
>   ->  got 36 bytes via IStream
> Clipboard format 49379
>   ->  got 269 bytes via HGLOBAL
>   ->  got 269 bytes via IStream
> Clipboard format 49729
>   ->  got 490 bytes via HGLOBAL
>   ->  got 490 bytes via IStream
> Clipboard format 49730
>   ->  got 8 bytes via HGLOBAL
>   ->  got 8 bytes via IStream
> Clipboard format CF_UNICODETEXT
>   ->  got 36 bytes via HGLOBAL
>   ->  got 36 bytes via IStream
> Clipboard format CF_TEXT
>   ->  got 18 bytes via HGLOBAL
>   ->  got 18 bytes via IStream
> Clipboard format 49731
>   ->  got 146 bytes via HGLOBAL
>   ->  got 146 bytes via IStream
> Clipboard format 49171
>   ->  got 312 bytes via HGLOBAL
>   ->  got 312 bytes via IStream
> Clipboard format CF_LOCALE
>   ->  got 4 bytes via HGLOBAL
>   ->  got 4 bytes via IStream
> Clipboard format CF_OEMTEXT
>   ->  got 18 bytes via HGLOBAL
>   ->  got 18 bytes via IStream

That is strange - it looks very much like simple text in the clipboard.

Cheers,

Mark


More information about the python-win32 mailing list