Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to destroy winword process after script termination?

Status
Not open for further replies.

Dav136

Technical User
Oct 3, 2003
21
0
0
AT
I'm using this VBscript to run a Macro (contained in autodru.dot) in a Word-object I create with VBS.
However, after Termination of the Macro/Script there is still a Winword.exe Process in my Task Manager. How do I destroy the object thoroughly?

THANKS!
David

Code:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("autodru.dot")
objWord.Visible = False
objWord.Run "LWPrint.Main"
Set objdoc = Nothing
Set objword = Nothing
 
Hello Dav136,

Add close & quit.
Code:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("autodru.dot")
objWord.Visible = False
objWord.Run "LWPrint.Main"
objDoc.close
objWord.quit
Set objDoc = Nothing
Set objWord = Nothing
regards - tsuji
 
Thanks for helping!!

...still at the beginning of the VBS-road,
David

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top