Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
VinayBarnwal
 
Posts: n/a
Default How to check whether a word document is empty?

Hi,
I am trying to filter out the empty word documents of different versions
which include Word 95 document too. Is there an API which can do this without
actually opening the word document?

I have tried to get this work done using the combination of "checksum" &
"size" of the documents. I have got the list of mappings of "checksum" &
"size" for all empty word documents from a sample of 1000 documents including
95 documents too. Do you have any idea upto what % this way will give me the
correct result?

Your suggestions are welcome.
Thanks,
Vinay
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default How to check whether a word document is empty?

Hi ?B?VmluYXlCYXJud2Fs?=,

I am trying to filter out the empty word documents of different versions
which include Word 95 document too. Is there an API which can do this without
actually opening the word document?

I have tried to get this work done using the combination of "checksum" &
"size" of the documents. I have got the list of mappings of "checksum" &
"size" for all empty word documents from a sample of 1000 documents including
95 documents too. Do you have any idea upto what % this way will give me the
correct result?

I don't think anything like this would work. A document could contain
properties, styles and other things that would affect the document size, as well
as the binary contents, and still be "empty". You'd have to be able to
programmatically read (and understand) the binary file structure, which changed
substantially going from Word95 to 97. Through Microsoft, you can request the
binary file structure information, but only for the most recent version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
VinayBarnwal
 
Posts: n/a
Default How to check whether a word document is empty?

I really appreciate you for your time to answer the same.
In fact in my case, I don't care if there are any styles or properties but
no charecter.
I want to find out such documents which do not have any charecter, there
could be styles and properties.
Please let me know your thoughts.
Thanks,
Vinay

"Cindy M -WordMVP-" wrote:

Hi ?B?VmluYXlCYXJud2Fs?=,

I am trying to filter out the empty word documents of different versions
which include Word 95 document too. Is there an API which can do this without
actually opening the word document?

I have tried to get this work done using the combination of "checksum" &
"size" of the documents. I have got the list of mappings of "checksum" &
"size" for all empty word documents from a sample of 1000 documents including
95 documents too. Do you have any idea upto what % this way will give me the
correct result?

I don't think anything like this would work. A document could contain
properties, styles and other things that would affect the document size, as well
as the binary contents, and still be "empty". You'd have to be able to
programmatically read (and understand) the binary file structure, which changed
substantially going from Word95 to 97. Through Microsoft, you can request the
binary file structure information, but only for the most recent version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
 
Posts: n/a
Default How to check whether a word document is empty?

One of Word's built-in properties is the number of characters. I believe it
is possible to access document properties without opening the file, but
possibly not for (and certainly not in) Word 95 since it requires VBA. See
http://word.mvps.org/faqs/macrosvba/DSOFile.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"VinayBarnwal" wrote in message
...
I really appreciate you for your time to answer the same.
In fact in my case, I don't care if there are any styles or properties but
no charecter.
I want to find out such documents which do not have any charecter, there
could be styles and properties.
Please let me know your thoughts.
Thanks,
Vinay

"Cindy M -WordMVP-" wrote:

Hi ?B?VmluYXlCYXJud2Fs?=,

I am trying to filter out the empty word documents of different

versions
which include Word 95 document too. Is there an API which can do this

without
actually opening the word document?

I have tried to get this work done using the combination of

"checksum" &
"size" of the documents. I have got the list of mappings of "checksum"

&
"size" for all empty word documents from a sample of 1000 documents

including
95 documents too. Do you have any idea upto what % this way will give

me the
correct result?

I don't think anything like this would work. A document could contain
properties, styles and other things that would affect the document size,

as well
as the binary contents, and still be "empty". You'd have to be able to
programmatically read (and understand) the binary file structure, which

changed
substantially going from Word95 to 97. Through Microsoft, you can

request the
binary file structure information, but only for the most recent version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question

or reply
in the newsgroup and not by e-mail :-)



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
VinayBarnwal
 
Posts: n/a
Default How to check whether a word document is empty?

Thanks for your time to reply. Actually I am looking for the solution which
can work for word 95 as well and my requirement is to programatize that
component so that without actually opening the document I can know the number
of charecters.

"Suzanne S. Barnhill" wrote:

One of Word's built-in properties is the number of characters. I believe it
is possible to access document properties without opening the file, but
possibly not for (and certainly not in) Word 95 since it requires VBA. See
http://word.mvps.org/faqs/macrosvba/DSOFile.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"VinayBarnwal" wrote in message
...
I really appreciate you for your time to answer the same.
In fact in my case, I don't care if there are any styles or properties but
no charecter.
I want to find out such documents which do not have any charecter, there
could be styles and properties.
Please let me know your thoughts.
Thanks,
Vinay

"Cindy M -WordMVP-" wrote:

Hi ?B?VmluYXlCYXJud2Fs?=,

I am trying to filter out the empty word documents of different

versions
which include Word 95 document too. Is there an API which can do this

without
actually opening the word document?

I have tried to get this work done using the combination of

"checksum" &
"size" of the documents. I have got the list of mappings of "checksum"

&
"size" for all empty word documents from a sample of 1000 documents

including
95 documents too. Do you have any idea upto what % this way will give

me the
correct result?

I don't think anything like this would work. A document could contain
properties, styles and other things that would affect the document size,

as well
as the binary contents, and still be "empty". You'd have to be able to
programmatically read (and understand) the binary file structure, which

changed
substantially going from Word95 to 97. Through Microsoft, you can

request the
binary file structure information, but only for the most recent version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question

or reply
in the newsgroup and not by e-mail :-)






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
 
Posts: n/a
Default How to check whether a word document is empty?

You might try the download anyway. It may well work for Word 95 files is
used in a later version.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"VinayBarnwal" wrote in message
...
Thanks for your time to reply. Actually I am looking for the solution

which
can work for word 95 as well and my requirement is to programatize that
component so that without actually opening the document I can know the

number
of charecters.

"Suzanne S. Barnhill" wrote:

One of Word's built-in properties is the number of characters. I believe

it
is possible to access document properties without opening the file, but
possibly not for (and certainly not in) Word 95 since it requires VBA.

See
http://word.mvps.org/faqs/macrosvba/DSOFile.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup so
all may benefit.

"VinayBarnwal" wrote in message
...
I really appreciate you for your time to answer the same.
In fact in my case, I don't care if there are any styles or properties

but
no charecter.
I want to find out such documents which do not have any charecter,

there
could be styles and properties.
Please let me know your thoughts.
Thanks,
Vinay

"Cindy M -WordMVP-" wrote:

Hi ?B?VmluYXlCYXJud2Fs?=,

I am trying to filter out the empty word documents of different

versions
which include Word 95 document too. Is there an API which can do

this
without
actually opening the word document?

I have tried to get this work done using the combination of

"checksum" &
"size" of the documents. I have got the list of mappings of

"checksum"
&
"size" for all empty word documents from a sample of 1000

documents
including
95 documents too. Do you have any idea upto what % this way will

give
me the
correct result?

I don't think anything like this would work. A document could

contain
properties, styles and other things that would affect the document

size,
as well
as the binary contents, and still be "empty". You'd have to be able

to
programmatically read (and understand) the binary file structure,

which
changed
substantially going from Word95 to 97. Through Microsoft, you can

request the
binary file structure information, but only for the most recent

version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow

question
or reply
in the newsgroup and not by e-mail :-)





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
In Word, how do I surpress headers and footers on page 2 Bill Microsoft Word Help 1 December 15th 05 07:13 PM
How do I create a Word form like corel WP merge documents? dlee_at_mmsgov Microsoft Word Help 2 October 8th 05 06:29 AM
how do i set up template in vbeditor without proggramming language ARRRGH New Users 4 October 1st 05 03:19 AM
Envelope Address GR New Users 5 April 24th 05 09:48 PM
Continuous breaks convert to next page breaks Jennifer Hunt Microsoft Word Help 2 December 30th 04 06:45 PM


All times are GMT +1. The time now is 06:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"