I have found some code which prints out a whole load of Word doc
properties, all of whcih seems correct, except for the number of pages
figure!?
Ah, well now you're about to discover that I know not the detail
whereof I speak ... just the principles. It's being a technical
architect and not a technical specialist that does it.
However, if you open up Word, and in the help look for "Microsoft Word
Visual Basic Reference" (you need to have VBA installed to find it),
then you'll find documentation of the complete Object Model that Weird
implements. I see that there is a "Document" object, which has as one
of its properties is the "Words" property, which according to the help
"Returns a Words collection that represents all the words in a range,
selection, or document ..."
That suggests that once you've zigged and zagged a bit in Win32::OLE
you should be able to do something like
$WordCount = $MyDoc->Words->Count;
Happy to help with your trial and error .. but it might be better to
take it to email from here on (hide our collective incompetence). The
reply-to address is valid.
Henry Law <>< Manchester, England