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
 
Joe,
If you are only looking for Page Counts in Office documents then a faster
way would to use the COM component which reads the documents properties
without opening the documents. Look at the example below. You can use the
DLL used in the example below.

Dsofile.exe Lets You Edit Office Document Properties
http://support.microsoft.com/?kbid=224351


--
Regards
Shyam Pillai

Handout Wizard
http://www.mvps.org/skp/how/
 

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