原始文本看起来像这样:
一个 bc ab
您需要将其替换а b为a bc发生的情况:
一个公元前一个公元前
但是当你更换它时,你会得到:
一个 bcc 一个 bc
使用的代码:
With Selection.Find
.Forward = True
.ClearFormatting
.Text = "a b"
.MatchWholeWord = True
.MatchCase = True
.Replacement.Text = "a bc"
End With
Selection.Find.Execute Replace := wdReplaceAll
我如何进行搜索以替换“与查询中完全相同”?
添加
.MatchSuffix = True使用通配符的第二个选项