Hello
I'm jusing late binding to copy from excel to powerpoint.
I can easily copy and paste as shape ... but I'd like to paste as range, it's text and numbers I have. If I paste as shape the background are pasted as well, I do not like that ...
Below is the code I use ...
It's the line "PPPres.Slides(1).Shapes.Paste" I'd like to change ...
Thanks
Sub Latebinding()
Dim otherApp As Object
Dim otherDoc As Object
Dim otherSpecificObjects As Object
Set otherApp = CreateObject("Powerpoint.Application")
Set otherApp = GetObject(, "Powerpoint.Application")
Dim PPApp As Object
Dim PPPres As Object
Dim PPSlide As Object
Dim rng As Excel.Range
Set PPApp = CreateObject("Powerpoint.Application")
Set PPPres = PPApp.Presentations.Open("P:\sb\test.ppt")
Set rng = ThisWorkbook.ActiveSheet.Range("A2:g45")
rng.Copy
PPPres.Slides(1).Shapes.Paste
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
End Sub
I'm jusing late binding to copy from excel to powerpoint.
I can easily copy and paste as shape ... but I'd like to paste as range, it's text and numbers I have. If I paste as shape the background are pasted as well, I do not like that ...
Below is the code I use ...
It's the line "PPPres.Slides(1).Shapes.Paste" I'd like to change ...
Thanks
Sub Latebinding()
Dim otherApp As Object
Dim otherDoc As Object
Dim otherSpecificObjects As Object
Set otherApp = CreateObject("Powerpoint.Application")
Set otherApp = GetObject(, "Powerpoint.Application")
Dim PPApp As Object
Dim PPPres As Object
Dim PPSlide As Object
Dim rng As Excel.Range
Set PPApp = CreateObject("Powerpoint.Application")
Set PPPres = PPApp.Presentations.Open("P:\sb\test.ppt")
Set rng = ThisWorkbook.ActiveSheet.Range("A2:g45")
rng.Copy
PPPres.Slides(1).Shapes.Paste
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
End Sub