merging multiple powerpointn presentations (interspersed)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there some way to write a VB script to merge multiple slideshows in an
interspersed manner? I have 8 slideshows to merge together.

e.g.
slideset 1, slide 1
slideset 2, slide 1
slideset 3, slide 1
slideset 1, slide2
slideset2, slide 2
slideset 3, slide 3

As you can see, I don't want to append the slidesets one after the other.
The content from each slideset are intermixed in the master slideset. I
would like to try to automate this collation of multiple slidesets together
if possible.

Thanks,
EW
 
This is certainly possible. If you have the luxury of choosing the filenames
(ie, SlideSet1.ppt, SlideSet2.ppt) rather than dealing with randomly named
files, it'll simplify things.

Also, is it safe to assume that each slide set has the same number of slides?

And that they're based on the same template?
 
Hi Steve,

The powerpoint files have fixed names. I can hardcode the script to open
those files. The slidesets are all based on the same template.

Is there some sample code I can study to get an idea how to do the type of
collating I described below?

Thanks,
EW
 
There was a mistake in my example. I meant the following:

Master slideset:
slideset 1, slide 1
slideset 2, slide 1
slideset 3, slide 1
slideset 1, slide 2
slideset 2, slide 2
slideset 3, slide 2

slideset1 is at c:/test1.ppt
slideset2 is at c:/test2.ppt
slideset3 is at c:/test3.ppt

I would like preserve formatting when the slide is copied into the master.
 
OK, here's a little stitchery project to play with ;-)
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

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
 
Thanks a lot. It worked really well.

Steve Rindsberg said:
OK, here's a little stitchery project to play with ;-)
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

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





-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Back
Top