Powerpoint can't paste bitmap from clipboard

S

skaushik

My application places a bitmap onto the clipboard using
SetClipboardData. The bitmap is copied in both the CF_BITMAP and CF_DIB
formats, and it can be pasted into Microsoft Paint, Wordpad, and pretty
much any other application. However, it cannot be pasted into
Powerpoint.

Does Powerpoint not recognize the plain old bitmap format on the
clipboard? Is there some other format that I should copy the bitmap to
the clipboard as?

Thanks,

-K
 
K

Kaushik Sridharan

Okay, I have some more insight on the problem.

My application copies the bitmap to the clipboard in three formats:
CF_DIB, CF_BITMAP and CF_HTML. In the HTML case, there's just some text
and a link to a locally saved copy of the bitmap.

Powerpoint can paste the image if I only place the CF_DIB and CF_BITMAP
formats on the clipboard. It cannot paste it if I also include the
CF_HTML format. However, I can paste it if I select Paste Special and
then choose one of the bitmap formats.

Apparently, Powerpoint cannot paste the the HTML format that's placed
in the clipboard. Furthermore, it tries to paste the HTML format (and
fails) even though the bitmap formats are also available. I tried this
on Powerpoint 2003 SP1, by the way.

The workaround is to always chose Paste Special, but I'd prefer if just
Paste also were to work. Any ideas?

-K
 
S

skaushik

Yeah, that seems to be the problem. It is unfortunate that Powerpoint
does not try the bitmap formats when the HTML paste fails. Also, the
order in which the formats are placed on the clipboard seem to have no
bearing on the priority used by Powerpoint.

Thanks for your response. This is the app I am talking about btw:

http://bhelpuri.net/Snippy/

-K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top