dhouck
06-08-2015, 12:08 PM
Hello,
I am trying to rename multiple slide in a Powerpoint Presentation and then select those slides based on the names I have just given them to past into a new presentation. Here is what I have so far. Any help would be greatly appreciated!! - Dave
Sub Dist_Slicer()
Dim osource As Presentation
Dim otarget As Presentation
ActiveWindow.Selection.SlideRange(1).Name = "AV1"
ActiveWindow.Selection.SlideRange(5).Name = "AV2"
ActiveWindow.Selection.SlideRange(17).Name = "AV3"
'Data Range For Test File 1
Set osource = ActivePresentation
Set otarget = Presentations.Add
osource.Slides(AV1).Copy
otarget.Slides.Paste (otarget.Slides.Count + 1)
With Application.ActivePresentation
.SaveAs "Test File 1" & "_" & RptYear & "_" & RptMth, ppSaveAsDefault
End With
With Application.ActivePresentation
.Save
.Close
End With
End Sub
I am trying to rename multiple slide in a Powerpoint Presentation and then select those slides based on the names I have just given them to past into a new presentation. Here is what I have so far. Any help would be greatly appreciated!! - Dave
Sub Dist_Slicer()
Dim osource As Presentation
Dim otarget As Presentation
ActiveWindow.Selection.SlideRange(1).Name = "AV1"
ActiveWindow.Selection.SlideRange(5).Name = "AV2"
ActiveWindow.Selection.SlideRange(17).Name = "AV3"
'Data Range For Test File 1
Set osource = ActivePresentation
Set otarget = Presentations.Add
osource.Slides(AV1).Copy
otarget.Slides.Paste (otarget.Slides.Count + 1)
With Application.ActivePresentation
.SaveAs "Test File 1" & "_" & RptYear & "_" & RptMth, ppSaveAsDefault
End With
With Application.ActivePresentation
.Save
.Close
End With
End Sub