find number pages withpout opening doc file?

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
 
C

Cindy M -WordMVP-

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 :)
 
G

Geoff Cox

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::eek:le ...

Cheers

Geoff
 
C

Cindy M -WordMVP-

Hi Geoff,
regret not into VBA - I think it may be
possible to access the properties via perl and win32::eek:le ...
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 :)
 
G

Geoff Cox

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::eek:le 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
 
C

Cindy M -WordMVP-

Hi Geoff,
I have now found that out for myself! I have used some Perl code plus
win32::eek:le 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 :)
 
G

Geoff Cox

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top