You can use the following steps to rearrange slides using Excel VBA:
Sub RearrangeSlides()
Dim pptApp As PowerPoint.Application Dim pptPres As PowerPoint.Presentation
Set pptApp = New PowerPoint.Application Set pptPres = pptApp.Presentations.Open("c:\path\to\presentation.pptx")
pptPres.Slides(2).MoveTo pptPres.Slides.Count
You can rearrange multiple slides by repeating this code for each slide you want to move.
Finally, add the code to save and close the presentation:
pptPres.Save pptPres.Close pptApp.Quit
End Sub
Your PowerPoint presentation should now have the slides rearranged according to your code.
Asked: 2023-01-21 11:00:00 +0000
Seen: 10 times
Last updated: May 26 '22