Sentence/Syllable Counts

G

Guest

Does Word have a tool that can count how many sentences as well as syllables you have in a document? I know it'll count words and lines, but that's not what I need. If there is a way other than doing it the old fashioned way, please let me know.
 
D

Doug Robbins - Word MVP

Running the following macro will give you a count of the number of sentences
where a sentence is considered to be a string of text that ends with a
period followed either by a space or is at the end of a paragraph.

Dim counter As Long
counter = 0
With ActiveDocument.Content.Find
Do While .Execute(FindText:=". ", Forward:=True) = True
counter = counter + 1
Loop
End With
With ActiveDocument.Content.Find
Do While .Execute(FindText:=".^p", Forward:=True) = True
counter = counter + 1
Loop
End With

MsgBox "The document contains " & counter & " sentences."

Syllables you will probably have to do the old-fashioned way.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

Nothing wrong with that at all. It's me. I don't know everything. <g>

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
L

Larry

Also, ActiveDocument.Sentences.Count counts sentences ending in a period
followed by a close quote, as well as sentences ending in question mark
or exclamation mark. A macro to handle all those situations would have
to get pretty big. :)

Larry
 

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