Dim wrdApp As Object
Dim wrdDoc As Object
On Error GoTo myErr
Set wrdApp = GetObject(, "Word.Application") ‘有Word进程时
Set wrdDoc = wrdApp.Documents.Open("Word文件地址")
wrdApp.Visible = True '显示Word
wrdApp.Run "Word 宏名"
Set wrdDoc = Nothing
Set wrdApp = Nothing
Exit Sub
myErr:
Set wrdApp = CreateObject("Word.Application") ‘没有Word进程时
Set wrdDoc = wrdApp.Documents.Open("Word 文件地址")
wrdApp.Visible = True '显示Word
wrdApp.Run "Word 宏名"
Set wrdDoc = Nothing
Set wrdApp = Nothing