fredmartinmaine
IS-IT--Management
Had a similar issue a while back with Excel and solved it, in similar fashion to the below, but it doesn't appear to be working with Outlook.
My vbscript opens Outlook to parse some things out of an email body. When it comes time to quit the script, I close Outlook like this:
While testing, I have task manager open. Rarely, the Outlook object goes grey for a moment, then dies. But - about 95% of the time, it goes grey and hangs there, never dies. I have to kill it with task manager.
Is there a proper way to get Outlook to close cleanly?
Thanks.
My vbscript opens Outlook to parse some things out of an email body. When it comes time to quit the script, I close Outlook like this:
Code:
objEmailItem.Close FALSE ' close email don't save
Set objEmailItem = Nothing
objOutlook.Application.Quit
Set objOutlook = Nothing
WScript.Quit
While testing, I have task manager open. Rarely, the Outlook object goes grey for a moment, then dies. But - about 95% of the time, it goes grey and hangs there, never dies. I have to kill it with task manager.
Is there a proper way to get Outlook to close cleanly?
Thanks.