http://qs321.pair.com?node_id=334720

nicholas has asked for the wisdom of the Perl Monks concerning the following question:

Hello All,

How can I get the page and line count of MS-Word document. I am using win32::ole package.

Code example will be highly appritiated. I hope i will get the answer. Please ASAP

while(($object = $enum->Next)) { $para_temp++; $paragraph = $object->Range->{Text}; $allText .= $paragraph; chop $paragraph; unless ($paragraph eq '') { $paragraph_count++; } chomp $paragraph; @words = split /\s+/, $paragraph; $nwords += @words; @chars = split //, $paragraph; $nchars += @chars; }
Thanks Nicholas

Edited by Chady -- added code tags.