How do I close a Word document in my Excel VBA application ?
Posted on 2013-11-30
I have an Excel 2010 VBA application in which I open a Word document and save it with a different filename.
When I close the Word document the 'copied' version is still open. It might be obvious but how do I close this 'Doc' file within my VBA code ?
The code looks like this....
Dim WordApp As Object
Dim WordDoc As Object
MsgBox "Your Word document has been saved as " & strDocumentName, vbInformation