Counting sentences

U

Ulf Nilsson

Hi again!
I just found the answer:
MsgBox ActiveDocument.Content.ReadabilityStatistics(4).Value
 
A

Anand.V.V.N

Hi

Good that you found there is another way to obtain that

ActiveDocument.Sentences.count, this will you you the nuber of sentences in
a document.

Anand
 
J

Jezebel

But as you might have observed, Doc.Sentences.Count is not the same as the
readability statistic. Sentences, in the object model, is a structural unit.
The readability statistic is intended to be a syntactic unit.
 
A

Anand.V.V.N

But, do both give the same result? like if a document contians say 100
sentences, will both give 100 or would there be a difference.

Anand
 
J

Jonathan West

Anand.V.V.N said:
But, do both give the same result? like if a document contians say 100
sentences, will both give 100 or would there be a difference.

No, they don't give the same result. Almost invariably, Doc.Sentences.count
will return a larger number.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jezebel

I've not tested it in detail, but yes, they are nearly always different.
Sentences.Count seems to be essentially a function of punctuation, while the
statistics count is looking at word sequences.
 

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