kerrypnx
11/21/2018 - 1:38 AM

检测小型大写

revise 11-21


Sub detectSmallCap()
    With ActiveDocument.Content.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ChrW(100) + "-"
        .MatchWildcards = False
        .Replacement.Text = ""
        .Replacement.highlight = True
        .Execute Replace:=wdReplaceAll
    End With
    
    With ActiveDocument.Content.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ChrW(108) + "-"
        .MatchWildcards = True
        .Replacement.Text = ""
        .Replacement.highlight = True
        .Execute Replace:=wdReplaceAll
    End With
End Sub