Reputation: 63
I am running into issues creating a Word document Word from Excel using
Set wordapp = CreateObject("word.Application")
Set letter = wordapp.Documents.Add
On first run it works fine, on second run it hangs. I think the issue is if I close the document I created using the Close Button in Word, it won't close WinWord.Exe. I think it has to do with whether I saved the document or not. How can I get around this?
I uninstalled/deactivated all of my Add-ins (I heard that could be an issue) to no avail.
Upvotes: 1
Views: 3910
Reputation: 8033
try closing and releasing the objects
Set wordapp = CreateObject("word.Application")
Set letter = wordapp.Documents.Add
'release the letter object
set letter = Nothing
'quit the word appication
wordApp.Quit
'release the app object
set wordapp = Nothing
Upvotes: 1