Hi all,
I'm sending some emails from Access via Outlook. In general, the pseudocode is below:
BTW, I've tried this using early and late binding.
But either way, when I get to the olApp.Quit line, it has no error and steps through it normally, but in the Task Manager I still see Outlook.exe sitting there. And when the next email is sent (this is on a timer) yet another Outlook.exe appears in the task manager...and another and another. And they each take up 40-50-meg.
I've tried using GetObject() thinking it would get the instance that's out there, but no, it creaets a new one.
So bottom line--how do I 'really, really, for sure' Quit the outlook app?
Thanks,
--Jim
I'm sending some emails from Access via Outlook. In general, the pseudocode is below:
Code:
Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(olFolderOutbox)
'Prepare message, send mail
'...blah, blah...
Set olExpl = olApp.Explorers.Add(olNS.GetDefaultFolder(olFolderOutbox), olFolderDisplayNormal)
olExpl.CommandBars("Tools").Controls("Send/Receive").Controls(1).Execute
olExpl.Close
Set olExpl = Nothing
olApp.Quit
set olApp = Nothing
But either way, when I get to the olApp.Quit line, it has no error and steps through it normally, but in the Task Manager I still see Outlook.exe sitting there. And when the next email is sent (this is on a timer) yet another Outlook.exe appears in the task manager...and another and another. And they each take up 40-50-meg.
I've tried using GetObject() thinking it would get the instance that's out there, but no, it creaets a new one.
So bottom line--how do I 'really, really, for sure' Quit the outlook app?
Thanks,
--Jim