Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Paula Cross Paula Cross is offline
external usenet poster
 
Posts: 1
Default change the grammar and style option that calls out


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




--
Paula Cross
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default change the grammar and style option that calls out

Paula Cross wrote:
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 FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default change the grammar and style option that calls out

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

Jay Freedman wrote:
Paula Cross wrote:
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.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
spelling/grammar check, add to dictionary not offered as option Dictionary option/Bob Microsoft Word Help 2 May 14th 07 11:42 PM
How to get Spell&Grammar option in Word97 under WinXP limited acc' Spell&Grammar in Word97 and WinXP Microsoft Word Help 2 January 10th 07 07:56 PM
Grammar & Style €“ Settings Michael_Corral Microsoft Word Help 0 October 14th 05 02:47 PM
abbreviations defined before use - Grammar & style option Dr Eddy Parkinson Microsoft Word Help 3 December 29th 04 06:24 PM
Can you use AP Style for Grammar Checking in MS Word Tegar Microsoft Word Help 1 December 16th 04 04:12 AM


All times are GMT +1. The time now is 09:52 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"