Group:  Microsoft Outlook ยป microsoft.public.outlook.general
Thread: outlook will not shutdown when i exit the program?

outlook will not shutdown when i exit the program?
Roger Pope 12/30/2008 6:10:05 AM
Hi when I exit outlook 2003 I get the outlook icon still in the system tray
area. Please can someone tell me how i can shut down outlook correctly. This
has started happening over the last couple of weeks since I did any windows
update.
Re: outlook will not shutdown when i exit the program?
Leith Ross <Leith.Ross.3l84em[ at ]thecodecage.com> 12/30/2008 8:51:45 AM
Hello Roger Pope,

You can the Outlook code you need into this macro. It uses the Windows Script Shell to to start and terminate Outlook. This is the only method that will close Outlook down completely, including TSR (Terminate and Stay Resident) components.
Code: --------------------
'Written: December 30, 2008
'Author: Leith Ross

Sub StartAndStopOutlook()

Dim olApp As Object
Dim olWsh As Object
Dim Wsh As Object

'Create Shell control
Set Wsh = CreateObject("WScript.Shell")

'Start Outlook
Set olWsh = Wsh.Exec("Outlook.exe")

'Attach object variable to the running instance of Outlook
Set olApp = GetObject("", "Outlook.Application")
'++++++++++++++++++++++++++++'
'+ Outlook code goes here +'
'++++++++++++++++++++++++++++'
'Quit Outlook
olApp.Quit

'Terminate Outlook program
olWsh.Terminate

'Free memory
Set olApp = Nothing
Set olWsh = Nothing
Set Wsh = Nothing

End Sub
--------------------
Sincerely,
Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=45042
Re: outlook will not shutdown when i exit the program?
VanguardLH <V[ at ]nguard.LH> 1/1/2009 3:22:01 AM
Roger Pope wrote:

[Quoted Text]
> Hi when I exit outlook 2003 I get the outlook icon still in the system tray
> area. Please can someone tell me how i can shut down outlook correctly. This
> has started happening over the last couple of weeks since I did any windows
> update.

What happens when you right-click the tray icon for Outlook, deselect to
minimize to system tray, and then click on the "X" titlebar button to
exit Outlook?

What happens when you use the File -> Close menu?

Home | Search | Terms | Imprint
Newsgroups Reader