Hi all,
In Access 2003, I have code that sends email using the Outlook.Application object. At the end of the code, after sending the email and making sure the outbox is empty, I use the .quit method and set the object references to Nothing. Yet in the taskmanager, Outlook is still there. And I know it was not there when the code starts--I test this and see Outlook pop into taskmgr when I run the code, then the .quit method throws no errors, but Outlook remains.
The problem is--and this I cannot re-create at-will--that sometimes it creates a second, sometimes third listing for Outlook in the taskmgr. I'm using the New Outlook.application to set the object--but I can step through it a dozen times and it will keep the same single Outlook listing in the taskmgr, but other times when I let the process run automatically, I'll come back and see 3 Outlooks listed (all under same username).
So is this normal, is there another way to quit outlook in code? Or is it an MS thing where it decides to cache the object instance in case it has some background cleanup to do?
Thanks,
--Jim
In Access 2003, I have code that sends email using the Outlook.Application object. At the end of the code, after sending the email and making sure the outbox is empty, I use the .quit method and set the object references to Nothing. Yet in the taskmanager, Outlook is still there. And I know it was not there when the code starts--I test this and see Outlook pop into taskmgr when I run the code, then the .quit method throws no errors, but Outlook remains.
The problem is--and this I cannot re-create at-will--that sometimes it creates a second, sometimes third listing for Outlook in the taskmgr. I'm using the New Outlook.application to set the object--but I can step through it a dozen times and it will keep the same single Outlook listing in the taskmgr, but other times when I let the process run automatically, I'll come back and see 3 Outlooks listed (all under same username).
So is this normal, is there another way to quit outlook in code? Or is it an MS thing where it decides to cache the object instance in case it has some background cleanup to do?
Thanks,
--Jim