Shapes (Unknown Member) Pasting from Excel into Powerpoint
<p>I'm having an issue when trying to copy a range from Excel and paste into Powerpoint using VBA.</p>

<p>I receive the following error: <code>Run-time error (80048240) Shapes (unknown member): Invalid request. Clipboard is empty or contains data which may not be pasted here.</code></p>

<p>The error is thrown in the following code using Excel 2010 and Powerpoint 2010:</p>

<pre><code>ws.Range("A1:Y" &amp; lastRow).Copy

pApp.ActiveWindow.View.GotoSlide 2
pApp.ActiveWindow.Panes(2).Activate

With .Slides(2).Shapes
    .PasteSpecial (ppPasteHTML) `&lt;~~~ Error occurs here!`
End With
</code></pre>

<p>This only occurs when using the <code>ppPasteHTML</code> option or the <code>ppPasteDefault</code> option.</p>

<p>The clipboard is definitely not empty and I can manually paste the range as HTML using the paste special menu option in Powerpoint which is confusing me as this is what the error indicates the issue is.</p>

<p>I've researched several question, none of which have helped. They indicated that I needed to activate the slide first prior to pasting which the above code will do but the error is thrown.</p>

<p>Can anyone suggest the reason for the error and how to resolve the issue?</p>