Last active
June 29, 2020 08:26
-
-
Save martinctc/c98545df02aa807424134e6e7f0cd7b1 to your computer and use it in GitHub Desktop.
[PowerPoint Slide Master Clean Up] #PowerPoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub SlideMasterCleanup() | |
| ' This macro cleans up all the unused slide layouts in your Slide Master. | |
| ' Primarily used for reducing file size, especially if slide layouts make use of large HD images. | |
| ' Should ideally be used once the contents are near-complete, to ensure that you do not need those additional slide layouts. | |
| Dim i As Integer | |
| Dim j As Integer | |
| Dim oPres As Presentation | |
| Set oPres = ActivePresentation | |
| On Error Resume Next | |
| With oPres | |
| For i = 1 To .Designs.Count | |
| For j = .Designs(i).SlideMaster.CustomLayouts.Count To 1 Step -1 | |
| .Designs(i).SlideMaster.CustomLayouts(j).Delete | |
| Next | |
| Next i | |
| End With | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment