Dim myFind() As Variant, myReplace() As Variant, aArray As Variant Dim N As Byte '定义一个查找内容的数组 myFind = Array(" "," {3,}") '定义一个替换内容的数组 myReplace = Array(" "," ") '关闭屏幕更新 Application.ScreenUpdating = False '在数组中循环 For Each aArray In myFind '活动文档中查找与替换 With ActiveDocument.Content.Find .ClearFormatting .Replacement.ClearFormatting .Wrap = wdFindStop .Execute findtext:=aArray, Replacewith:=myReplace(N), Replace:=wdReplaceAll N = N + 1 '累加 End With Next '恢复屏幕更新 Application.ScreenUpdating = True 就是在这个宏中,“ {3,}"不起作用。请指点!谢谢。 |