View Single Post
 
Old 10-03-2023, 09:10 AM
East East is offline Windows 10 Office 2019
Novice
 
Join Date: Aug 2023
Posts: 7
East is on a distinguished road
Default

This should work, except when you have tables.

Code:
Sub AddFullStopToTerm()
    With ActiveDocument.Content.Find
        .ClearFormatting
        .Text = "(No restrictions apply)([!.])"
        .Replacement.ClearFormatting
        .Replacement.Text = "\1.\2"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
End Sub
Reply With Quote