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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-01-21 11:00:00 +0000
Seen: 10 times
Last updated: May 26 '22
How to split an Excel file with a single column containing many records?
How can I use VBA to bring a csv file into MSAccess?
How to use VBA to make a Gantt chart that includes timestamps for day, hour, and minute?
How can new worksheets be automatically generated and saved according to the date?
Can Visual Basic be used to code the Grep command?
How can I use VBA to create a border around cells that have text or a value in them?
How can I use Excel VBA to transfer information from an Oracle table to an Excel worksheet?