Share via

Insert slides from multiple presentations at once

Anonymous
2012-04-13T22:31:21+00:00

I have no idea how or why this was done this way, but I received 300+ PowerPoint files that are one slide each (each slide contains a photograph). Is there an easy way to combine all of them into one presentation?

If nothing else, a way to view them without opening each one separately would help a little.

I have v2003, v2007, and v2010 if that helps. Hopefully one of them can accomplish this easily.

Thanks!

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
2012-04-15T03:27:46+00:00

>> I think that this would be a good job for VBA. VBA should be able to cycle through each file in a directory and insert the slides into the current slide. Other than hat, I'm not sure thre is going to be n easy way.

Other than hat?  Thre's a crowd? 

Hey, David, did you leave out the "I'm poking this out on my iPad" disclaimer?  ;-)

But Jod, David's right ... good job for VBA.  Put your main presentation, the one you want to suck all the others into, and all the others in the same folder together.  Pop this code into a module in the "mother ship" presentation or into another presentation, make sure the mother-ship is the active presentation, then run the code. 

Option Explicit

Sub InsertAllSlides()

'  Insert all slides from all presentations in the same folder as this one

'  INTO this one

    Dim vArray() As String

    Dim x As Long

    ' Change "*.PPT" to "*.PPTX" or whatever if necessary:

    EnumerateFiles ActivePresentation.Path & "", "*.PPT", vArray

    With ActivePresentation

        For x = 1 To UBound(vArray)

            If Len(vArray(x)) > 0 Then

                .Slides.InsertFromFile vArray(x), .Slides.Count

            End If

        Next

    End With

End Sub

Sub EnumerateFiles(ByVal sDirectory As String, _

    ByVal sFileSpec As String, _

    ByRef vArray As Variant)

    ' collect all files matching the file spec into vArray, an array of strings

    Dim sTemp As String

    ReDim vArray(1 To 1)

    sTemp = Dir$(sDirectory & sFileSpec)

    Do While Len(sTemp) > 0

        ' NOT the "mother ship" ... current presentation

        If sTemp <> ActivePresentation.Name Then

            ReDim Preserve vArray(1 To UBound(vArray) + 1)

            vArray(UBound(vArray)) = sDirectory & sTemp

        End If

        sTemp = Dir$

    Loop

End Sub

Was this answer helpful?

0 comments No comments

13 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-04-16T04:14:09+00:00

    Thanks guys ... especially Steve for including the VBA, because I'd have no clue! I'll give it a try when I get a chance and report back.

    Cheers,

    Jodi

    Was this answer helpful?

    0 comments No comments
  2. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2012-04-15T18:11:22+00:00

    In the sig line off to the right, maybe? 

    David M. Marcovitz, Ph.D.

    Author of Powerful PowerPoint for Educators

    http://PowerfulPowerPoint.com

    I'm literate.  My iPad is ... well ... an iPad.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-04-15T03:42:56+00:00

    > Other than hat?  Thre's a crowd? 

    > Hey, David, did you leave out the "I'm poking this out on my iPad" disclaimer?  ;-)

    Busted...or is that basted? For email, the iPad automatically adds the disclaimer. I haven't figured out how to do that for the forum.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-04-14T02:31:25+00:00

    I think that this would be a good job for VBA. VBA should be able to cycle through each file in a directory and insert the slides into the current slide. Other than hat, I'm not sure thre is going to be n easy way.

    Was this answer helpful?

    0 comments No comments