(Solved) – Copying table from excel to PowerPoint using VBA

(solved)-–-copying-table-from-excel-to-powerpoint-using-vba
Sub Range()
Dim XLApp As Excel.Application
Dim PPSlide As Slide

Set XLApp = GetObject(, "Excel.Application")
XLApp.Range("A1:C12").Copy
PPSlide.Shapes.PasteSpecial DataType:=ppPasteOLEObject, Link:=msoFalse

End Sub

I am getting an error “Object variable or with block variable not set” . There seems to be an error with PPSlide.Shapes.PasteSpecial DataType:=ppPasteOLEObject, Link:=msoFalse

Leave a Reply

Your email address will not be published. Required fields are marked *