change the grammar and style option that calls out

  • Thread starter Thread starter Paula Cross
  • Start date Start date
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
 
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.
 
Oops, my mistake -- take out the line that starts with "MsgBox", unless you
want to see a message pop up for every long sentence.
 
Back
Top