change the grammar and style option that calls out

P

Paula Cross

I want to know how to change the grammar and style option that calls ou

sentences that are more than 60 words per sentence. I want to chang
the
grammar checking so when I run the Spelling and Grammar tool, it wil
flag
sentences with more than 25 words, rather than 60 words.
thanks,
Paul
 
J

Jay Freedman

Paula said:
I want to know how to change the grammar and style option that calls
out sentences that are more than 60 words per sentence. I want to change
the grammar checking so when I run the Spelling and Grammar tool, it will
flag sentences with more than 25 words, rather than 60 words.
thanks,
Paula

That grammar rule can't be changed.

The following macro will apply a yellow highlight to every sentence longer
than 25 words (although this is Microsoft's internal definition of "word",
which includes certain punctuation marks).

Sub LongSentences()
Const Limit = 25 ' <== change this if needed
Dim mySent As Range

For Each mySent In ActiveDocument.Sentences
If mySent.Words.Count >= Limit Then
MsgBox mySent.Words.Count
mySent.HighlightColorIndex = wdYellow
End If
Next
End Sub

See http://www.gmayor.com/installing_macro.htm if needed.

After you run the macro, use the Edit > Find dialog to search for
highlighted text.

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

Jay Freedman

Oops, my mistake -- take out the line that starts with "MsgBox", unless you
want to see a message pop up for every long sentence.
 

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