Word Counts with different answers

G

Gareth Edwards

I have been trying to compare my own word count algrothm with Microsoft
Word's word count statistics, and have found at least three ways of
retrieving a word count from word.

1. In the properties dialog under the File menu.
2. At the end of the Spelling and Grammar check.
3. Using the ReadabilityStatistics collection on the Document object in VBA.

However an most documents I have check I get three different answers!!!!!
For example one document I got word counts of 1,154, 1,144 and 645.

Has any one else come across this or know why this might be happening?

Gareth Edwards
Database Manager
Higher Education Funding Council for England
 
J

Jezebel

You missed Document.Words.Count, retrievable from VBA.

The issue is that 'word' is actually quite hard to define. Is a phone number
a word? Or three words? Is "tab-delimited" one word or two? What do you do
with meaningless strings, marked as "no language", within a table?

In the file menu, the count is an indicator of the file length. In VBA,
"word" is any sequence of letters delimited by a non-letter (so 'Bill's'
counts as two. You might also restrict the count to string sequences that
are in, or derivable from, the dictionary. You have to remember that Word
doesn't understand English (or any other language); it's just manipulating
characters.
 
J

Jay Freedman

Gareth said:
I have been trying to compare my own word count algrothm with
Microsoft Word's word count statistics, and have found at least three
ways of retrieving a word count from word.

1. In the properties dialog under the File menu.
2. At the end of the Spelling and Grammar check.
3. Using the ReadabilityStatistics collection on the Document object
in VBA.

However an most documents I have check I get three different
answers!!!!! For example one document I got word counts of 1,154,
1,144 and 645.

Has any one else come across this or know why this might be happening?

Gareth Edwards
Database Manager
Higher Education Funding Council for England

Hi Gareth,

Jezebel mentioned the VBA property Document.Words.Count. This suffers from
the unfortunate habit of counting punctuation and paragraph marks as
"words".

However, there is the Tools > Word Count dialog, which usually comes much
closer to what humans think of as the number of words in a document or
selection. It can also be used in a macro, as discussed in a thread in the
microsoft.public.word.vba.general newsgroup:

http://groups.google.com/group/micr...read/thread/3c72bf6d768012a3/3bfeaa105852f9a0

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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