Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / General MS Word Questions / January 2004

Tip: Looking for answers? Try searching our database.

find number pages withpout opening doc file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Geoff Cox - 30 Dec 2003 19:35 GMT
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
Cindy M  -WordMVP- - 31 Dec 2003 10:43 GMT
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 :-)
Geoff Cox - 31 Dec 2003 20:01 GMT
>Hi Geoff,
>
[quoted text clipped - 9 lines]
>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

>Cindy Meister
>INTER-Solutions, Switzerland
[quoted text clipped - 3 lines]
>This reply is posted in the Newsgroup; please post any follow question
>or reply in the newsgroup and not by e-mail :-)
Cindy M  -WordMVP- - 01 Jan 2004 09:07 GMT
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 :-)
Geoff Cox - 01 Jan 2004 09:17 GMT
>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

>Cindy Meister
>INTER-Solutions, Switzerland
[quoted text clipped - 4 lines]
>This reply is posted in the Newsgroup; please post any follow
>question or reply in the newsgroup and not by e-mail :-)
Cindy M  -WordMVP- - 01 Jan 2004 11:27 GMT
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 :-)
Geoff Cox - 02 Jan 2004 10:43 GMT
>Hi Geoff,
>
[quoted text clipped - 9 lines]
>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

>Cindy Meister
>INTER-Solutions, Switzerland
[quoted text clipped - 3 lines]
>This reply is posted in the Newsgroup; please post any follow question
>or reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.