PasteSpecial of Device Independent Bitmap with VBA in PP2007

W

wgk

Unfortunately I'm not able to paste a copied area (Cells + Shapes) from Excel
2007 as a Device Independet Bitmap (DIB) into PowerPoint with VB.

The VB PasteSpecial method of PowerPoint does not contain DIB as a
xlPasteType. With the existing types I get a result of poor resolution. If I
manually Cut and PasteSpecial, I can choose DIB and the quality of the
picture is almost equal to the original.

Coding:

With PPT
..Slides(i).Shapes.PasteSpecial DataType:=ppPastexxx 'xxx = any type won't
give a good result
With .Slides(i).Shapes(3)
..Left = 12.5
..Top = 83.5
..Height = .Height * 0.99
..Width = .Width * 0.99
End With
End With

In O2003 I had no problem, there I used DataType:=ppPasteMetafilePicture and
the result was sattisfying.
 
E

Edward

In Excel 2007 copy as picture ( clcik on paste dropdown\last item "As
picture"\copy as picture\format bitmap) and in your PPVBA code use

ActivePresentation.Slides(1).Shapes.PasteSpecial ppPasteDefault
 
W

wgk

Doesn't work

Run-time error '-2147188160 (80048240)':
Shapes (unknown member) : Invalid request. Clipboard is empty or
contains data which may not be pasted here.

I think the problem is, that the data consists out of Excel cells and shapes.

And it is not logical to me, that I can not use the Device Independent
Bitmap as a DataType like it is possible when choosing paste special via the
menu.
 

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