Thread: Word Count
View Single Post
  #4   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word Count

On Sun, 3 Sep 2006 18:31:44 +0200, "Jorge Bravo"
wrote:

I am using Word 2007 Beta.

Is it possible to get the "Sentence count" ? (The number of sentences)

Thank you


A count, of somewhat dubious accuracy, is available through the macro
language.

Open the macro editor (Alt+F11), display the Immediate window
(Ctrl+G), paste in the following line, and press Enter.

?ActiveDocument.Sentences.Count

The number will appear on the next line of the window. If you need to
use this often, make this into a complete macro and assign it to a
shortcut or QAT toolbar button:

Sub SentenceCount()
MsgBox ActiveDocument.Sentences.Count & " sentences"
End Sub

When I tried this on a small document with 9 sentences and one
picture, the macro said there were 10 sentences. So if you have
graphics in your document, don't take this count as accurate.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.