Can someone please help me with the VBA Code to Copy Slides 1 to Slide 20 (I have a ppt with 450 slides)and save as a new presentation (New Presentation name should be XYZ.pptx
I have tried
Sub ExportSlides()
Dim myPresentation As Presentations
Set myPresentation = Presentations("PPTWITH450SLIDES.pptx").Slides.range(Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))
myPresentation.Export ("C:\Users\rajat.kapoor\Droom Overview.pptx",FilterName:="pptx")
End Sub
but it is giving compile error: Syntax Error in the last line
myPresentation.Export ("C:\Users\rajat.kapoor\Droom Overview.pptx",FilterName:="pptx")