Private Sub cmdWord_Click()
    With wdApp
    .Visible = False
    .Documents.Add App.Path & "\test.doc", False
    .Selection.GoTo wdGoToBook, , , "aaaaaaa"
    .Selection.TypeText "bbbbbb"
    .Application.ActiveDocument.SaveAs (App.Path & "\Report\test2.doc")
    .ActiveDocument.Close
    End With
    Set wdApp = Nothing
End Sub

解决方案 »

  1.   

    少了关闭Word的语句:
    Private Sub cmdWord_Click()
        With wdApp
        .Visible = False
        .Documents.Add App.Path & "\test.doc", False
        .Selection.GoTo wdGoToBook, , , "aaaaaaa"
        .Selection.TypeText "bbbbbb"
        .Application.ActiveDocument.SaveAs (App.Path & "\Report\test2.doc")
        .ActiveDocument.Close
        End With
        wdApp.Quit  '<------------------------加上这句就OK
        Set wdApp = Nothing
    End Sub
      

  2.   

    wdApp.Quit  
    恭喜樓上的答對了.