Micro Focus QTP (UFT) Forums
get page wise word count in msword using VB - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: get page wise word count in msword using VB (/Thread-get-page-wise-word-count-in-msword-using-VB)



get page wise word count in msword using VB - jgkgopi - 06-22-2011

I want to get word count for page 1 ,page 2 and so on.

How to get the words count based on the pages
If it's 5 pages i want words count for 1,2,3,4,5 pages details

I got the no of page count in msword
by using this
Code:
noofpages = wrdDoc.BuiltInDocumentProperties("Number of pages")

Got total Words count in msword also
wrdDoc.Words.Count

Thanks in advance


RE: get page wise word count in msword using VB - Skepsis - 06-30-2011

Dont think it is possible directly so try by getting the doc word contents ( as long as its all text) then having found the last sentence of the page you want, count the words up to that sentence.

Just an idea.