Private Sub Document_New()
' 确定性的替换
'
'
Selection.Find.ClearFormatting
Dim Y As Variant
Dim G As Variant
F = Array("张三")
G = Array("李四")
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("张三")
G = Array("李四")
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
如何实现替换后的标记着色啊