'Ignore text marked as No Proofing language
I have a word document with some text marked as Review/Language/Do not check spelling or grammar. Why is my code not considering "Proofing"?
Sub SentenceProofing()
Dim iWords As Integer
Dim Text As String
Dim oRange As range
Set oRange = ActiveDocument.range
If Not ActiveDocument.Saved Then
ActiveDocument.Save
End If
'Set number of words
iWords = 15
With oRange.Find
.NoProofing = False
For Each MySent In oRange.Sentences
If MySent.Words.Count > iWords Then
ActiveDocument.Comments.Add _
range:=MySent, Text:="Sentence longer than 15 words"
End If
Next
End With
End Sub
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
