How do I quickly compile a single PowerPoint presentation from slides saved in multiple files?

As a reporting analyst, part of my responsibilities involved compiling the monthly review slide deck for senior management

Whilst it was not a difficult task, it was a pretty boring and time consuming one.

Every month, I had to to compile 10 decks, each consisting of 70 slides, which had to be updated to show the figures for the past month.

Linking Excel to PowerPoint was not an option because of the resulting image resolution. Getting a screenshot of the relevant numbers as an Enhanced Metafile image, however, worked much better resolution-wise.

Therefore, my first step was to develop a list of VBA procedures that would export all the Excel figures I needed as Enhanced Metafile images and place them in interim slide decks

• How Do I Quickly Re-filter and Export My Pivot Table Views to PowerPoint Slides?

• How Do I Quickly Export Multiple PivotTables to PowerPoint Slides?

• How Do I Quickly Export My Charts to PowerPoint Slides?

• How Do I Quickly Re-filter and Export Camera Tool Views to PowerPoint Slides?

Having these in place meant that all I needed to do was compile all the slides from the interim decks into a presentation that followed a certain structure. The easiest way to do this would be to:

(a) develop the structure as a template

(b) come up with a way that would automatically place the latest slides in their respective sections

That’s how I came up with the following snippet.

Option Explicit
Sub Update_Slide_Data()
Dim Ppres As Presentation
Set Ppres = Presentations("C:\Users\Angelina\Documents\2015_Review.pptm")
Dim location As String
location = "C:\Users\Angelina\Documents\2013_Review.pptx"
Dim PPS As PowerPoint.Slide
Dim Sh As Shape
Dim Str As String
Dim i As Integer
Dim StrNo As Long
Dim ResNo As Long
Dim indicator As String
Dim Data As PowerPoint.Presentation
indicator = InputBox("Please enter the desired indicator in UPPER case")
For i = 1 To Ppres.Slides.Count
Str = Ppres.Slides(i).Shapes.Title.TextFrame.TextRange
StrNo = InStr(Str, indicator)
Select Case indicator
Case "FLASH"
If StrNo <> 0 Then
Set Data = Presentations.Open("C:\Users\angelina\Documents\Pics.pptm")
Data.Slides.Range(Array(34, 37)).Copy
Ppres.Slides.Paste (i + 1)
Call Irrelevant
End If
If StrNo <> 0 Then
Set Data = Presentations.Open("C:\Users\angelina\Documents\Projects.pptm")
Data.Slides.Range(Array(2, 3)).Copy
Ppres.Slides.Paste (i + 1)
End If
If StrNo <> 0 Then
Set Data = Presentations.Open("C:\Users\angelina\Documents\Balance.pptm")
Data.Slides.Range(Array(1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 22, 23, 25, 26, 27, 28)).Copy
Ppres.Slides.Paste (i + 1)
End If
End Select
Next i
'save as pptx
If Ppres.Slides.Count >= 69 Then Call S
End Sub
view raw SlideinSlides.bas hosted with ❤ by GitHub

Every time the code runs, it pops up a input box message asking you to indicate which section of the PowerPoint you would like to update

Depending on your input, it will then:

(1) open the relevant interim PowerPoint,

(2) take the slides associated with the region stated in the title of the slide

(3) and paste them immediately after the section header slide

Finally, it will check if the presentation had all the necessary slides and call a separate saving procedure if this was the case.