Start Outlook automatically in tray
Is there a way to start up Outlook automatically on login, but minimised to system tray (notification area)? I don’t want my inbox showed in my face when I start my PC, only a discrete notification when new mail arrives.
I’m using Outlook 2003, if that matters.
Solution 1:
Outlook 2010 (x86) on Windows 7 (x64): Launch and Minimize to System Tray on Startup
I know this thread is somewhat old; however, a web search turns up numerous accounts of this problem and I have been unable to find one that provides a working solution. For whatever reason, the normal solutions to this issue do not work in all cases.
Problem:
- On initial login, the Outlook icon remains visible on the Taskbar forcing one to restore the window and then minimize manually before Outlook will remove itself from the Taskbar.
- Simply adding the Outlook shortcut to the Startup folder and selecting Hide When Minimized from the context menu of the Outlook Tray Icon does not solve the issue.
- Using the /Min flag from a batch file or shortcut doesn't work either.
Solution:
- Open Outlook manually and right-click the Outlook Tray Icon to verify that Hide When Minimized is checked.
-
Create a new text file and insert the following code.
OPTION EXPLICIT CONST PATH_TO_OUTLOOK = """C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE""" CONST SHOW_MAXIMIZED = 3 CONST MINIMIZE = 1 DIM shell, outlook SET shell = WScript.CreateObject("WScript.Shell") ' Open Outlook shell.Run PATH_TO_OUTLOOK, SHOW_MAXIMIZED, FALSE ON ERROR RESUME NEXT ' Grab a handle to the Outlook Application and minimize SET outlook = WScript.CreateObject("Outlook.Application") WScript.Sleep(100) outlook.ActiveExplorer.WindowState = SHOW_MAXIMIZED ' Loop on error to account for slow startup in which case the ' process and/or the main Outlook window is not available WHILE Err.Number <> 0 Err.Clear WScript.Sleep(100) SET outlook = NOTHING SET outlook = WScript.CreateObject("Outlook.Application") outlook.ActiveExplorer.WindowState = MINIMIZE WEND ON ERROR GOTO 0 SET outlook = NOTHING SET shell = NOTHING
IMPORTANT! Be sure to change
PATH_TO_OUTLOOK
to reflect the actual location of your installation.- Rename the text file to whatever you would like with a
.vbs
extension in order to force Windows to recognize it as a VBScript.
Optional:
- Store the script anywhere you would like.
- Create a shortcut to the script and place it in the Startup folder instead.
- Right-click the shortcut and select properties.
- Using the Change Icon button, browse to the location of the Outlook executable and select the Outlook icon stored within the executable.
Performance Improvement:
Instead of placing the script or a shortcut to the script in the Startup folder, the registry can be edited in order to run the script immediately at login.
- Follow steps 1-4 in the Solution section above.
- Place the script anywhere you would like.
- Add a new String Value or a new Expandable String Value if necessary to the registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
. - Name it whatever you would like.
- Modify the new value you created with the path to the script.
Solution 2:
Outlook has no built-in feature for this, but you can use the start
command:
-
Create a shortcut in your Startup folder pointing that executes the command
cmd /c start /min "" "FullPathOfOutlook.exe"
or a batch file containing the command
@start /min "" "FullPathOfOutlook.exe"
Right-click the tray icon and check Hide when minimized.
Solution 3:
I have used the above code for some considerable time and would like to thank all previous contributors for sharing their work/improvements/suggestions. Recently however, I have experienced two unwelcome and irritating issues when it is used in conjunction with Windows 10 (64 Bit) and Outlook 2016 (64 Bit) these are:
The Outlook icon in the System Tray displays a 'cog' overlay with the message "Another program is using Outlook. To disconnect programs and exit Outlook, click the Outlook icon and then click Exit Now".
Attempts to open Outlook from the 'Open Outlook' context menu (right click Outlook icon in the tray) item causes a dialogue box to appear reporting "No active explorer object found". Clicking the "OK" option in response launches Outlook (though issue 1 - cog overlay) remains.
In order to resolve the issues above I set about finding some similar code which I could compile to meet the desired objectives of the original poster (which mirror my own requirements).
The code below is offered "as is" for the wider benefit of other SuperUsers, it is important to note that whilst I have tested the code on two W10 64 Bit systems (both with 64 Bit Office installed) I am still to resolve a RunTime issue on of one systems. The other functions flawlessly. Full details can be viewed here if required: https://stackoverflow.com/questions/45533261/start-outlook-2016-64-bit-automatically-minimised-to-windows-10-64-bit-syste
I will keep you appraised of any developments as testing continues.......
** Quick Update ** Now tested on HP Elitebook 8440P Laptop - Windows 10 Pro 64 Bit with Office 64 Bit + same 12 Outlook Addons - Functions flawlessly as per requirements outlined in the original post above.....
** Further Update ** Tested on a second HP Elitebook 8440P Laptop - Windows 10 Pro 64 Bit with Office 64 Bit + same 12 Outlook Addons - RunTime error experienced again :(
OPTION EXPLICIT
Dim WshShell
Dim OLObj
Set WshShell = WScript. CreateObject ( "Wscript.Shell" )
'Open Outlook: Note that inspite of the launch options, it will open the program in a normal window.
'The file location path is not necessary as Windows 10 correctly identifies Outlook's location.
WshShell.Run "OUTLOOK.EXE" , 3, false
'This will mimimise it to the system tray after a 10 second pause to allow for mail collection on Outlook launch.
WScript.Sleep (10000)
Set OLObj = GetObject("","Outlook.Application")
'Activates the window
OLObj.ActiveExplorer.Activate
'Sends the command to minimise
OLObj.ActiveExplorer.WindowState = 1
'Outlook does not immediately minimise to the system tray so that 'Send/Receive' can initiate mail collection.