Powerpoint slide count

  • Thread starter Thread starter Joe
  • Start date Start date
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.
 
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
 
Back
Top