outlook will not shutdown when i exit the program?

R

Roger Pope

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.
 
L

Leith Ross

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
 
V

VanguardLH

Roger said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top