V
Vincent
Hello all. I am performing a merge from some VBA code using the
following code:
wordApp.ActiveDocument.MailMerge.Execute
wordApp.Documents(1).PrintOut
Sleep 5000
wordApp.Documents(1).Close wdDoNotSaveChanges
wordApp.ActiveDocument.Close wdDoNotSaveChanges
.....
If Not wordApp Is Nothing Then
wordApp.Quit
Set wordApp = Nothing
End If
When this works, it works fine. However, if the first line should
fail, I am stuck with an open WINWORD.exe in my process list. I even
make sure that all of the close() routines are called on an error.
What is causing this process to remain behind? I want to ensure this
does not happen. Thanks for your help.
-Vincent
following code:
wordApp.ActiveDocument.MailMerge.Execute
wordApp.Documents(1).PrintOut
Sleep 5000
wordApp.Documents(1).Close wdDoNotSaveChanges
wordApp.ActiveDocument.Close wdDoNotSaveChanges
.....
If Not wordApp Is Nothing Then
wordApp.Quit
Set wordApp = Nothing
End If
When this works, it works fine. However, if the first line should
fail, I am stuck with an open WINWORD.exe in my process list. I even
make sure that all of the close() routines are called on an error.
What is causing this process to remain behind? I want to ensure this
does not happen. Thanks for your help.
-Vincent