Combine separate slides using command line

  • Thread starter Thread starter paul
  • Start date Start date
P

paul

I have a .ppt file with 50 slides. I have a DB where users specify
which slides they want, usually 1 or 2, and a script that automatically
sends it out once a week.

The easy solution was to separate each market into a separate file.
Then, in the script, I loop through and attach each slide that they
requested. The problem with this is that the size becomes very large,
and the users don't want to get multiple slides. It would be ideal to
combine the individual slides that they requested and send them the 1
file. So, I'm trying to determine if this is feasible. I was thinking
that I can 1) open the presentation and save just the selected slides,
and then send that to the user, or 2) combine the individual slides
into one and send it to the user.

I would appreciate any help on this. Right now I just need to know if
it's possible. Later, I can figure out how to do it.

Thanks for any help.

- PR
 
A couple of questions; the answers to these will be obvious to you but not
necessarily to anyone not involved in the problem.

I have a .ppt file with 50 slides. I have a DB where users specify
which slides they want, usually 1 or 2, and a script that automatically
sends it out once a week.

What's "it"?
The easy solution was to separate each market into a separate file.
Then, in the script, I loop through and attach each slide that they
requested. The problem with this is that the size becomes very large,
and the users don't want to get multiple slides.

I don't really follow this ... if you want to send multiple slides, but the
users don't want to get multiple slides, you have a problem, no? Or do you
mean that the users don't want to get multiple files (.PPT files,
presentations)?

In any case, it's certainly possible to start with your 50 slide presentation
and extract just the needed slides into a new PPT file. Simplistically:

Save the master file to a new file
Step through the new file and delete any slides that aren't on the list of "to
be sent" slides.
Save again.
Send.

An alternate approach is to break the master presentation into individual
1-slide PPT files, a la Slide001.PPT, Slide002.PPT and so on.

Then if the user wants slides 1,3 5, 7 and 42, you combine those into a single
presentation, save and send.

Either way, it's certainly quite feasible assuming that your database app can
include VBA or similar code (Access, for example) or that you're writing code
in an external app that drives both PPT and the database.
 
Maybe Ive got this wrong but couldn't you just open a new pres.
insert>slides from files - choose the slides required with ctrl click and
away you go?
 
To explain it a little more, I have a website where people can register
and select what information they want to receive. A VB script runs
once a week and sends them their weekly information as a powerpoint
presentation. The master PPT file is 20 Mb, and they only want to view
the information they selected. Right now, I have a macro that will
split the master file into individual PPT files each containing 1
slide. So now, the script will send the email and attach each slide of
information they selected. This works great but with one problem. If
someone selects two slised, then they receive two individual slides.
They want it to only send one .PPT file that contains two slides, not
two separate .PPT files each with one slide.

I could do this manually, that's trivial. The problem is that this
goes out to 500 people and the number of combinations is almost
endless. I need to do this somehow from a command line where I can
open Powerpoint, run a macro to save only the slides I need (or create
a new file by adding the individual slides they requested), and save it
to a temporary file so that I can attach it to an email and send it
out.

What I have now works, but I'm simple attaching multiple PPT files to
the email. I'm not trying to determing if it's possible to send out
just one .PPT file if someone selects to receive more than one slide.

I hope this helps. I'm still just trying to figure out if this can be
done. It sounds simple enough, and I'm able to do it with .PDF files.
And again, the end result here is to do this from a command line prompt
or a VB script.

Thanks again!

- PR
 
Paul,

Thanks for the extra info. That helps.

Weird bit of (probably useless) trivia: you can do

path_to\powerpnt.exe -i file.ppt file2.ppt file3.ppt

And it'll create a new blank presentation and insert the slides from files
supplied. But (here's where the "probably useless" part comes into play) only
in PPT 2000 and previous. Pity ... that'd have been perfect.

I don't think there's any way of doing this from a command line, but it can
certainly be automated either externally (from VB, VBScript or most any other
language that can do automation) or internally (via macros running within
Powerpoint itself).

In fact, if you search the newsgroup for postings from Bill Foley with "email"
in the text, you'll find pointers to code to automate the email part of your
process as well.

To insert a slide is simple ... in outline form:

Dim oPres as Presentation

' Create a new presentation
Set Pres = Presentations.Add

' Insert a slide from file
oPres.Slides.InsertFromFile _
Filename:= "full path to file.ppt", _
Index:=oPres.Slides.Count

' The new presentation probably included a slide by default
' If so, delete it
oPres.Slides(1).Delete

' And save
oPres.SaveAs Filename:="full path to saved file.ppt"


In practice, you'd need to put the bit that inserts the slide(s) in a loop that
works its way through a list of the slides you want to insert.

Assuming you've got an automated way of producing the list of client names,
email addresses and selected slides already, that might be the best place to
start.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top