Hi,

I'm having some trouble trying to program VBA to paste an Excel table into a PowerPoint slide (I'm using office 2007). I need this to be pasted as a table, not a picture, so that the text size can be edited in Powerpoint to suit.

Essentially, I want to achieve the same result as if you simply paste manually. I can also acheieve the desired result by manually using PasteSpecial and choosing HTML format, however when trying to use the 'PasteSpecial DataType:=ppPasteHTML' method in VBA it does not work and I get the following error message:

Run-time error '-2147188160 (80048240)':

Shapes (unknown member) : Invalid request. Clipboard is empty or contains data which may not be pasted here.
This is the code snippet I am using (pg is the range in Excel that I am copying):

Please Login or Register  to view this content.
Any advice as to how I can resolve this would be much appreciated.

Thank you,

Ryan