I have multiple powerpoint templates (2007). I am trying to copy the slides from each of these templates into a new presentation. I am trying to get the syntax to copy the entire slide from one presentation to a new presentation.
Thanks for any suggestions or ideas on how to get this done.
' Variable declarations.
Dim SourceView, answer As Integer
Dim SourceSlides, NumPres, x As Long
' Stores the current view of the source presentation.
SourceView = ActiveWindow.ViewType
' Count the number of slides in source presentation.
SourceSlides = objPresentation.Slides.Count 'objPresentatio.Slides.Count '
' Create a new presentation for the designation.
Set objPresentation2 = ActivePresentation
.SlideHeight = objPresentation.PageSetup.SlideHeight
.SlideWidth = objPresentation.PageSetup.SlideWidth
' Switch to the source presentation.
' Loop through all the slides and copy them to destination one by one.
For x = 1 To SourceSlides
' Select the first slide in the presentation and copy it.
' Switch to destination presentation.
' Create a new slide.
objPresentation2.Slides.Count + 1, ppLayoutBlank
' Make sure the new presentation is slide view.
If ActiveWindow.ViewType <> ppViewSlide Then
ActiveWindow.ViewType = ppViewSlide
' Switch to the proper slide.
' Paste the slide.
' Unselect the object.
' Switch to source.
' Restore the current view to source.
ActiveWindow.ViewType = SourceView