我习惯用FileDialog 对象按ctrl复选打开所有文件,当然也可以用DIR或FSO对象打开后再替换
Sub test()
Dim doc As Document
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.FilterIndex = 2
.Show
.Execute
End With
For Each doc In Documents
doc.Range.Find.Execute FindText:="建设一班", ReplaceWith:="建设二班", Replace:=wdReplaceAll
doc.Save
doc.Close
Next
End Sub