Private Sub Document_New()
' 确定性的替换
'
'
Selection.Find.ClearFormatting
Dim Y As Variant
Dim G As Variant
F = Array("VBA")
G = Array("C++A")
Set myRange = ActiveDocument.Content
For i = 0 To UBound(F)
myRange.Find.Execute FindText:=F(i), ReplaceWith:=G(i), Replace:=wdReplaceAll
Next i
MsgBox "替换完毕"
End Sub
如何实现替换后的标记着色
' 确定性的替换
'
'
Selection.Find.ClearFormatting
Dim Y As Variant
Dim G As Variant
F = Array("VBA")
G = Array("C++A")
Set myRange = ActiveDocument.Content
For i = 0 To UBound(F)
myRange.Find.Execute FindText:=F(i), ReplaceWith:=G(i), Replace:=wdReplaceAll
Next i
MsgBox "替换完毕"
End Sub
如何实现替换后的标记着色

