Sub a()
Dim WordApp As Object '定义Word Application
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
Dim WordDoc As Object '定义文档
Set WordDoc = WordApp.Documents.Open("D:\MYWORK\Excel2Word\Doc1.docx")
WordApp.Selection.WholeStory '文档全选
'将文档里所有的{0}替换成当前EXCEL单元格A1里面的内容
With WordApp.Selection.Find
.Text = "{0}"
.Replacement.Text = Cells(1, 1)
.Execute Replace:=wdReplaceAll
End With
WordDoc.Save ‘保存
WordDoc.Close
WordApp.Quit
Set WordDoc = Nothing
Set WordApp = Nothing
End Sub