Page 1 of 1

Reading number of pages in a Word-document (docx)

PostPosted: Thu Oct 08, 2020 10:16 pm
by driessen
Hello,

I need to know in my FWH-application how many pages there are in a Word-document (docx).

Does anyone know how to accomplish this?

Thank you very much in advance.

Re: Reading number of pages in a Word-document (docx)

PostPosted: Fri Oct 09, 2020 1:33 am
by RAMESHBABU
Hello Mr.Michel,

I need to know in my FWH-application how many pages there are in a Word-document (docx).
Does anyone know how to accomplish this?


Code: Select all  Expand view

nPages := oWord:ActiveDocument:ComputeStatistics(wdStatisticPages) // (wdStatisticPages Constant Value is 2)
 


-Ramesh Babu P

Re: Reading number of pages in a Word-document (docx)

PostPosted: Fri Oct 09, 2020 9:05 am
by driessen
Thank you so much.
You are a great help.

Re: Reading number of pages in a Word-document (docx)

PostPosted: Sat Oct 28, 2023 4:15 pm
by driessen
Hello everyone,

I tried to use the suggested solution to my question.
I need to read the number of pages in a Word document.
Unfortunately, I get an error : "Unexported method: Active Document.

Anyone with a suggestion for a solution?

Thank you very much for any help.

Re: Reading number of pages in a Word-document (docx)

PostPosted: Sat Oct 28, 2023 9:37 pm
by Natter
Write like this:

oDoc:=oWrd:Documets:Open(..
nPages := oDoc:ComputeStatistics(wdStatisticPages)

Re: Reading number of pages in a Word-document (docx)

PostPosted: Sat Oct 28, 2023 9:54 pm
by driessen
Mr. Notter,

Thank you very much for your help.
It's working just fine now.