find number pages withpout opening doc file?

  • Thread starter Thread starter Geoff Cox
  • Start date Start date
G

Geoff Cox

Hello

I have 500 plus docs (Word 2000) and would like to know the total
number of pages in these docs ... is there a way of doing this without
having to open each doc?!

I guess I am asking if there is a way of accessing the properties of
the doc file?

Cheers

Geoff
 
Hi Geoff,
I have 500 plus docs (Word 2000) and would like to know the total
number of pages in these docs ... is there a way of doing this without
having to open each doc?!

I guess I am asking if there is a way of accessing the properties of
the doc file?
There is, using VBA and a tool from Microsoft called DSOFile.exe, but:
page numbers are a "dynamic" property, and it only really generates
correctly when the document is open and can repaginate fully. The number
you get from a closed document may or may not be accurate.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Hi Geoff,

There is, using VBA and a tool from Microsoft called DSOFile.exe, but:
page numbers are a "dynamic" property, and it only really generates
correctly when the document is open and can repaginate fully. The number
you get from a closed document may or may not be accurate.

Cindy,

thanks for your reply - regret not into VBA - I think it may be
possible to access the properties via perl and win32::ole ...

Cheers

Geoff
 
Hi Geoff,
regret not into VBA - I think it may be
possible to access the properties via perl and win32::ole ...
Doesn't matter whether you use VBA or not :-) The properties
are still there, and accessible if your programming language
knows how to get to them. You might still look at DSOFile.exe,
as it's a COM utility.

But the reservation about the accuracy of the Word count in a
closed document still stands, no matter which programming
language you use.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30
2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
 
But the reservation about the accuracy of the Word count in a
closed document still stands, no matter which programming
language you use.

Cindy,

I have now found that out for myself! I have used some Perl code plus
win32::ole which does list many of the Word doc properties, all of
which seem correct, except for the number of pages!!

No way round this?

Cheers

Geoff
 
Hi Geoff,
I have now found that out for myself! I have used some Perl code plus
win32::ole which does list many of the Word doc properties, all of
which seem correct, except for the number of pages!!

No way round this?
Aside from opening the document, no. Or, if you could force the
documents to repaginate or perform an explicit Word Count before
they're closed, then the correct number would probably be saved in the
property (assuming the document is opened on the same machine, with the
same printer driver and printer available).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Hi Geoff,

Aside from opening the document, no. Or, if you could force the
documents to repaginate or perform an explicit Word Count before
they're closed, then the correct number would probably be saved in the
property (assuming the document is opened on the same machine, with the
same printer driver and printer available).

Cindy,

thanks again - pleased to have found your web site too!

Cheers

Geoff
 
Back
Top