Import/Export slides by Slide Title?

J

Jonathan

I would like to export each slide in a presentation to a stand-alone
presentation file. For example, a 20 slide presentation would become 20 ppt
files. I want the names of the standalone files to be the Titles of the
slides in the original presentation.

Then, I would like to be able to import into a new presentation a set of
such stand-alone slides.

The VBA code to export is available from
http://skp.mvps.org/ppt00036.htm#2
but I don't know the property/variable name for "Title" in powerpoint files?
thx
Jonathan
 
J

John Wilson

Change the corresponding line in Shyam's code to :
sFilename = (sSlideOutputFolder) & oSld.Shapes.Title.TextFrame _
..TextRange & ".ppt"

Note this will error if the slide has no title so you might want to add some
error code or at least make sure that all slides have a title placeholder
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
J

Jonathan

Excellent! Thanks!
This is probably a dumb further question, but it turns out I had hard
returns (CR's) and "?" in some titles, which crashes the macro. Is there a
way to qualify or automatically substitute something like a "_" for illegal
chars in file names?
Jonathan
 
J

Jonathan

THANKS!
Getting there, BUT:
sTemp = Replace(sTemp, "?", "_")
works to find and replace ? in Titles (illegal as part of filename, but
neither
sTemp = Replace(sTemp, "vbCrLf", "_")
nor any combo of
sTemp = Replace(sTemp, "vbNewLine", "_")
sTemp = Replace(sTemp, vbCrLf, "_")
sTemp = Replace(sTemp, "vbLf", "_")
sTemp = Replace(sTemp, "vbCr", "_")
i.e. w or w/o quotes seems to find and replace hard returns in Titles.
What am I doing wrong?
Jonathan
 

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

Top