Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF

Interleave slides from several presentations

Problem

A visitor to the PowerPoint Newsgroup asked whether it was possible to combine slides from several different presentations one at a time to end up with something like this:

Presentation 1, Slide 1
Presentation 2, Slide 2
Presentation 3, Slide 3

Presentation 1, Slide 1
Presentation 2, Slide 2
Presentation 3, Slide 3

and so on.

Solution

Here's a little bit of code that'll stitch the presentations together as requested.

It's hardly the most efficient thing in the world, as it opens and closes each presentation many times, but the logic's easier to follow that way and as long as it's the computers's fingers getting tired and not ours, why worry?

Sub InterLeaveMe()
' Assumes you start with a new presentation based on same template as
' "component" presentations, new presentation already open when you run the macro

    Dim oNewPres As Presentation
    Dim oSamplePres As Presentation
    Dim sPresBaseName As String
    Dim x As Long
    Dim y As Long
    Dim lNumPresentations As Long
    Dim lNumSlides As Long

    ' Edit these as needed
    sPresBaseName = "c:\temp\Pres"
    lNumPresentations = 3   ' number of presentations
    lNumSlides = 3          ' number of slides in each pres

    Set oNewPres = ActivePresentation

    For x = 1 To lNumSlides
        For y = 1 To lNumPresentations
            Set oSamplePres = Presentations.Open(sPresBaseName & CStr(y) & ".PPT")
            oSamplePres.Slides(x).Copy
            oNewPres.Slides.Paste
            oSamplePres.Close
        Next
    Next

End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2015 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.
Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Interleave slides from several presentations
http://www.pptfaq.com/FAQ00856_Interleave_slides_from_several_presentations.htm
Last update 07 June, 2011
Created: