PDA

View Full Version : Structure of the array that is returned by ClipboardFormats



Jurisfox
09-18-2007, 05:14 AM
Hi!

It's known, that Windows puts into clipboard a few formats,
that we can get by Application.ClipboardFormats.

But what means the value starting from 44 and often 50
as values of the last members of the array?
For example, if we copy the some text from Notepad and
after that examinate the result array we'll see the two members
with values 0 and 44.

Oorang
09-21-2007, 12:36 PM
0 is xlClipboardFormatText I haven't ever seen 44 or 50 (can't dig them up either). At first I thought it might be a combination of two flags but the enum is sequential and does not appear to be using bit flags.

Jurisfox
09-21-2007, 02:02 PM
Hi, Oorang!
Thank you for reply.
The first picture shows array values for data that has been copied from Notepad.

Jurisfox
09-21-2007, 02:05 PM
The second picture shows array values for data copied from screen that shows your reply. Just wondering what do these values (44,50 and similar, that not in range of the xlClipboardFormat values) mean.
(Excel 2003/Windows XP)

rory
09-22-2007, 06:12 AM
I can only guess that they are some sort of internal code which is not exposed to us mere mortals. (44 seems to appear with everything I copy in my tests). There is nothing useful you can do with them anyway as far as I can tell.

Oorang
09-24-2007, 11:40 AM
Hmm give this a read:
http://msdn2.microsoft.com/en-us/library/ms649013.aspx#_win32_Registered_Clipboard_Formats

I gave GetClipboardFormatNameA Sub a shot, but I still pulls back nothing, I surmise either A:) 44 is a private format. B:) The values in Application.ClipboardFormats do not directly correspond to the values used by the clipboard API.