I have a (set of) Word documents for which I am trying to get various properties (number of pages, author, etc.) using Win32 :: OLE in Perl:
print $MSWord->Documents->Open($name)-> BuiltInDocumentProperties->{"Number of pages"}->value . " \n";
This returns 4 pages. But the actual number of pages in the document is 9. The number of pages in the first section is 4. I want the total number of pages in the document.
If in Word VBA I do the following:
MsgBox ActiveDocument.BuiltInDocumentProperties("Number of pages")
Displaying 9. The number of pages displayed on the Properties / Statistics page is 9.
Do I need to recount? Is there a way to ask the OLE library to force recount, or do I need to process each section separately?
I am in XP, Word 2007, ActivePerl v5.10.0.
source share