Micro Focus QTP (UFT) Forums
To read total number of slides in Powerpoint presentation - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: To read total number of slides in Powerpoint presentation (/Thread-To-read-total-number-of-slides-in-Powerpoint-presentation)



To read total number of slides in Powerpoint presentation - aravindmys - 11-01-2010

Hi all,

Please help me in the below query

How to read the total number of slides in a power point presentation

Thanks


RE: To read total number of slides in Powerpoint presentation - KavitaPriyaCR - 11-08-2010

Hi try this:
Code:
Set objPPTApp=CreateObject("PowerPoint.Application")
objPPTApp.Visible=True
Set objPPTPres=objPPTApp.Presentations.Open("c:\path\Filename.ppt")
MsgBox objPPTPres.Slides.Count
objPPTPres.Close
objPPTApp.Quit
objPPTPres=Nothing
objPPTApp=Nothing