Here is a crude way to kill the Word process.
Sub Kill_Word()
Dim sKillWord As String
sKillWord = "TASKKILL /F /IM Winword.exe"
Shell sKillWord, vbHide
End Sub
Process Window
Use this option if you are sure that the process is unused one
Welcome to VBA Tips & Tricks. All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too Happy reading
Thank you
ReplyDeleteYou saved the day
Thanks! This was exactly what I needed.
ReplyDeleteDoesn't work for me in XP get a 53 error message
ReplyDelete53 means file not found, so winword.exe is probably already closed.
Deleteu saved my life, finally that works... ty :)
ReplyDeletethankyou! thankyou! thankyou!
ReplyDeletehowever, if you are running this in excel you may wait to put a wait in after it. I make mine wait 5 secs and everything works fine afterwards
Very helpful thanks just what was needed
ReplyDeleteVery Helpful. just what was needed when word continues as background process after
ReplyDeleteset WrdApp = Nothing