Created
July 7, 2016 15:04
-
-
Save IOIO72/e600d41dad18aed2a3ad4ee5df588398 to your computer and use it in GitHub Desktop.
This file contains 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 Extract() | |
Dim prsThis As Presentation | |
Dim prsThat As Presentation | |
Dim sldThis As Slide | |
Dim sldThat As SlideRange | |
Dim nss As NamedSlideShow | |
Dim strName As String | |
Dim i As Integer | |
Set prsThis = ActivePresentation | |
For Each nss In prsThis.SlideShowSettings.NamedSlideShows | |
Set prsThat = Application.Presentations.Add | |
prsThat.ApplyTemplate prsThis.FullName | |
For i = 1 To nss.Count | |
Set sldThis = prsThis.Slides.FindBySlideID(nss.SlideIDs(i)) | |
sldThis.Copy | |
Set sldThat = prsThat.Slides.Paste | |
sldThat.Design = prsThis.Designs(sldThis.Design.Index) | |
Next | |
strName = prsThis.FullName | |
prsThat.SaveAs Left(strName, Len(strName) - 4) & "-" & nss.Name | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment