Macro for finding long sentences

  • Thread starter Thread starter martin gifford
  • Start date Start date
M

martin gifford

Hi,

I remember seeing a macro that finds long sentences (say over 30 words) in
Word 2007.

Does anyone know which book it is in, or can anyone supply that macro?

I'm writing a book and people are complaining that the sentences are too
complex, so this would help me find long sentences so that I can simplify
them.

Thanks.
 
Sub ScratchMacro()
Dim oSent As Range
For Each oSent In Sentences
If oSent.Words.Count > 30 Then
oSent.HighlightColorIndex = wdYellow
Else
oSent.HighlightColorIndex = wdNoHighlight
End If
Next
End Sub
 
Martin said:
Sub ScratchMacro()
Dim oSent As Range
For Each oSent In Sentences
If oSent.Words.Count 30 Then
oSent.HighlightColorIndex = wdYellow
Else
oSent.HighlightColorIndex = wdNoHighlight
End If
Next
End Sub

martin gifford wrote:-
Hi,

I remember seeing a macro that finds long sentences (say over 30
words) in Word 2007.

Does anyone know which book it is in, or can anyone supply that
macro?

I'm writing a book and people are complaining that the sentences are
too complex, so this would help me find long sentences so that I can
simplify them.

Thanks. -

"Long" is a relative issue, and is actually perceived difficulty to
absorb what the author is trying to say. You may like "Robert
Gunning's Fog Index" to determine when a sentence is too
long/difficult. (You can find more info rapidly w/ Google)
 

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

Back
Top