Again with the help of the kind resources around stackoverflow, I have been using the code below to copy information from Excel 2010 into Powerpoint 2010 slides. I repeat th
The problem that you are facing is because the copying is taking time and the next line is getting executed and it doesn't find anything in the clipboard to paste.
Two ways to handle this problem
Way 1
XLApp.Range("WS1Dash").Copy
DoEvents
Set ppShape = PPSlide.Shapes.PasteSpecial(DataType:=ppPasteOLEObject, Link:=msoFalse)
Way 2
XLApp.Range("WS1Dash").Copy
Wait 2
Set ppShape = PPSlide.Shapes.PasteSpecial(DataType:=ppPasteOLEObject, Link:=msoFalse)
And paste this at the bottom of your procedure
Private Sub Wait(ByVal nSec As Long)
nSec = nSec + Timer
While nSec > Timer
DoEvents
Wend
End Sub
Lemme know if this doesn't help...
I was having the same problem and it happened as I was trying to export from Excel to PowerPoint without the PowerPoint reference, using it as object. The tricky thing was that sometimes it worked, other times it won´t. So after some testing I found out that it depends on the state of the PowerPoint View, if it is showing Thumbnails or a normal Slide view.
To fix it, set the ViewType as normal before pasting.
PPAP.ActiveWindow.ViewType = ppViewNormal
or
PPAP.ActiveWindow.ViewType = 9
PPAP stands for PowerPoint Application Object.