Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Outlook Task Still Running (http://www.outlookbanter.com/outlook-vba/30606-outlook-task-still-running.html)

Dan October 20th 06 10:14 PM

Outlook Task Still Running
 
I created a program that opens Outlook and looks for messages in a certain
folder, then closes. I have tried this code to close the application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a new
OUTLOOK.EXE task is started. How do I properly close down Outlook and get the
task ended? Any help would be appreciated. Thanks.

Peter Marchert October 20th 06 11:16 PM

Outlook Task Still Running
 
Did you tried "Set outLookApp = Nothing"?

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


Dan schrieb:

I created a program that opens Outlook and looks for messages in a certain
folder, then closes. I have tried this code to close the application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a new
OUTLOOK.EXE task is started. How do I properly close down Outlook and get the
task ended? Any help would be appreciated. Thanks.



Dan October 20th 06 11:22 PM

Outlook Task Still Running
 
I'm using C# code, and couldn't find a way to set the app to Nothing.

"Peter Marchert" wrote:

Did you tried "Set outLookApp = Nothing"?

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


Dan schrieb:

I created a program that opens Outlook and looks for messages in a certain
folder, then closes. I have tried this code to close the application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a new
OUTLOOK.EXE task is started. How do I properly close down Outlook and get the
task ended? Any help would be appreciated. Thanks.




Dmitry Streblechenko October 21st 06 12:26 AM

Outlook Task Still Running
 
outLookApp = null;
GC.Collect();

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Dan" wrote in message
...
I'm using C# code, and couldn't find a way to set the app to Nothing.

"Peter Marchert" wrote:

Did you tried "Set outLookApp = Nothing"?

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


Dan schrieb:

I created a program that opens Outlook and looks for messages in a
certain
folder, then closes. I have tried this code to close the application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a
new
OUTLOOK.EXE task is started. How do I properly close down Outlook and
get the
task ended? Any help would be appreciated. Thanks.






Dan October 21st 06 01:07 AM

Outlook Task Still Running
 
I tried that, but the process is still running.

"Dmitry Streblechenko" wrote:

outLookApp = null;
GC.Collect();

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Dan" wrote in message
...
I'm using C# code, and couldn't find a way to set the app to Nothing.

"Peter Marchert" wrote:

Did you tried "Set outLookApp = Nothing"?

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


Dan schrieb:

I created a program that opens Outlook and looks for messages in a
certain
folder, then closes. I have tried this code to close the application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a
new
OUTLOOK.EXE task is started. How do I properly close down Outlook and
get the
task ended? Any help would be appreciated. Thanks.






Dmitry Streblechenko October 21st 06 02:37 AM

Outlook Task Still Running
 
Does it work if you let the Window messag epump run for a while (e.g. by
displaying a message box)?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Dan" wrote in message
...
I tried that, but the process is still running.

"Dmitry Streblechenko" wrote:

outLookApp = null;
GC.Collect();

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Dan" wrote in message
...
I'm using C# code, and couldn't find a way to set the app to Nothing.

"Peter Marchert" wrote:

Did you tried "Set outLookApp = Nothing"?

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


Dan schrieb:

I created a program that opens Outlook and looks for messages in a
certain
folder, then closes. I have tried this code to close the
application:

outLookApp.Session.Logoff();
outLookApp.Quit();

But the OUTLOOK.EXE task is left running. If I re-run the program, a
new
OUTLOOK.EXE task is started. How do I properly close down Outlook
and
get the
task ended? Any help would be appreciated. Thanks.









All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com