PDA

View Full Version : Closing Word Application from Excel



jazzyt2u
10-10-2008, 10:05 AM
Hi,

If you use the following code to open a Word application and a file what code do you use to close the Word application after I have already closed the file?


Set oWord = CreateObject("Word.Application")
Set oDoc = oWord.Documents.Open(MyAll & "ReportTemplate.doc")
'coding blah blah blah
oDoc.SaveAs Filename:=(MyAll & MyFile)
oDoc.Close
'What do I put here to close the WORD applicaton?

Kenneth Hobs
10-10-2008, 10:20 AM
Set oword = Nothing

jfournier
10-10-2008, 10:44 AM
oWord.Quit
set oWord = Nothing

jazzyt2u
10-10-2008, 02:46 PM
Thank you both....something so simple....