Hi Guys.
I know there is a lot of threads on how to copy paste picture from xls to ppt via VBA. However my problem is a bit different.
I would like not to define the shape location by height, weight and top, left options. I'm thinking of having the object (Content Placeholder) already existing on the ppt slide, where I could paste the selection from the xls as the picture (this could be chart, pivot table or just data range) into. This object is called "CP1".
How should I modify the line below to be able to fill the placeholder with the object I just copied?
I would appreciate any help
I know there is a lot of threads on how to copy paste picture from xls to ppt via VBA. However my problem is a bit different.
I would like not to define the shape location by height, weight and top, left options. I'm thinking of having the object (Content Placeholder) already existing on the ppt slide, where I could paste the selection from the xls as the picture (this could be chart, pivot table or just data range) into. This object is called "CP1".
Code:
Sub test()
Dim myShapeRange As Object, PPApp As Object, PPPres As Object
Set PPApp = GetObject(, "Powerpoint.Application")
Set PPPres = PPApp.ActivePresentation
Sheets("Slide").Activate
Sheets("Slide").Range("A2:E8").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
[SIZE=4][B]Set myShapeRange = PPPres.Slides(1).Shapes("CP1").Paste[/B][/SIZE]
'that's the place where the problem starts
End Sub
How should I modify the line below to be able to fill the placeholder with the object I just copied?
I would appreciate any help