Discussion:
|
Attach this macro to a button on a toolbar you can use during document editing. Then, as you do an edit pass through a document, use it to flag all instances of words or phrases that will otherwise trip up a spell check: foreign terms, odd names, weird spellings, etc. As presented here, you'll end up with all flagged items set in green text and spell-checking turned off. The color is handy because it lets you see that the term has been encountered and you can later use Find & Replace to change the green font color back to automatic.
I have other versions set to different colours with the language set to other than my default. For example, as I encounter a French word in an English document, my French button sets it and all other instances of it in blue with language=French (Canada). This way, the spell check switches on the fly to the appropriate language. Moreover, as I do a spell check and encounter a foreign term, I can drop out and flag it; thus avoiding having to deal with it again if I need to spell check a version of the document again later.
|
Sub FlagThis()
Dim flagit As String
flagit = Selection
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With ActiveDocument.Content.Find
.ClearFormatting
.Text = flagit
With .Replacement
.Text = "^&"
.ClearFormatting
.Font.Color = wdColorGreen
.NoProofing = True
End With
.Execute Format:=True, Replace:=wdReplaceAll
End With
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
|