Tried several different way I could find online, but they all give me excel error messages....
(Mostly argument is not optional)
This is the code :
So after the chart has been pasted (this all works just fine) I simply want to add a new Slide.![]()
Sub Open_PowerPoint_Presentation() Dim objPPT As Object, _ PPTPrez As PowerPoint.Presentation, _ pSlide As PowerPoint.Slide, _ pptLayout As CustomLayout Set objPPT = CreateObject("PowerPoint.Application") objPPT.Visible = True Set PPTPrez = objPPT.Presentations.Open("H:\TEMP\PPT\Template\OpenATemplate.pptx") Set pSlide = PPTPrez.Slides(1) 'Charts Sheet9.Visible = xlSheetVisible Sheet9.Select Sheet9.Shapes.Range(Array("Picture 2")).Select Selection.Copy pSlide.Shapes(6).Select pSlide.Shapes.PasteSpecial(DataType:=ppPasteMetafilePicture).Select Application.CutCopyMode = xlCut End Sub
How hard can it be you would think....
Bookmarks