I use the following macro to check documents for US spelling (referencing an installed custom dictionary) and run a ligatures check, replacing any applicable ligatures. It works well but a number of formatting changes show up on the right hand side of the document, including:
- Formatted: Font 12 pt
- Formatted: Font Not Italic
- Field Code Changed
I’m OK with the above things being checked, but I don’t want them to be shown in the tracking (only the ligature replacement tracking should be shown).
Could someone help me to adjust the following macro code so that only the replacement of the ligatures shows in the tracking? Many thanks in advance!
Sub USEnglish() Selection.WholeStory Dim i As Long, j As Long, k As Long Dim StrFnd As String, StrRep As String Dim ArrRep(), oSuggestions, Rng As Range Application.CheckLanguage = False Application.ResetIgnoreAll Options.CheckGrammarAsYouType = True Options.CheckGrammarWithSpelling = True Options.ContextualSpeller = True Options.CheckSpellingAsYouType = True ArrRep = Array("ff", "fi", "fl", "ffi", "ffl") With ActiveDocument .TrackRevisions = True .Range.LanguageID = wdEnglishUS .SpellingChecked = False .GrammarChecked = False .ShowGrammaticalErrors = True .ShowSpellingErrors = True For i = 0 To UBound(ArrRep) StrFnd = ChrW(&HFB00 i) StrRep = ArrRep(i) For j = 1 To 3 On Error Resume Next With .StoryRanges(j).Find .ClearFormatting .Replacement.ClearFormatting .Text = StrFnd .Replacement.Text = StrRep .Wrap = wdFindContinue .MatchWildcards = True .Execute Replace:=wdReplaceAll End With Next j Next i End With End Sub