Powerpoint slide count

J

Joe

Does anyone know how to get the total slide count from a
PowerPoint application? I have written a macro that
retrieves the page count from word documents using the
wdStatisticPages function. Is there something similar in
PowerPoint?

Thanks.

Joe.
 
J

Joe

I am looping thru a Excel column looking at file name and
trying to determine page counts of Word, Excel and
PowerPoint files. The code below works on the first ppt
file and then stops. How do I close the PowerPoint
session that I just opened so that I can repeat the
process again? I believe that the presentation must be
opened to view the slide count.

Any ideas?


Set AppObject = CreateObject("PowerPoint.Application")
AppObject.Visible = True
AppObject.Presentations.Open
Filename:=loc
PageCount =
AppObject.ActivePresentation.Slides.Count
Cells(Count1, 2).Value = PageCount
AppObject.Close
Set AppObject = Nothing
 

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