Pin Me

Microsoft Outlook 2007 Tip #8 - Outlook.exe Startup Switches

written by: Mojave Media Group•edited by: Linda Richter•updated: 3/12/2009

Microsoft Office Outlook 2007 controls startup behavior through a set of startup switches for outlook.exe. Here are a few Outlook startup switches I use fairly regularly.

  • slide 1 of 3

    How to Run Outlook from the Command Line

    Most users will launch Microsoft Outlook 2007 from the default Start menu, desktop or Quick Launch shortcuts. But there are times where Outlook needs to be started with specific settings applied either as a one-time function or a regular routine. There are command line switches for Outlook to perform specific tasks, to clean up settings, and even to incorporate into scripted solutions.

    By default, Outlook, as a component of Microsoft Office, is installed in the following location:

    c:\Program Files\Microsoft Office\Office12\outlook.exe

    Since this path is not included in the Windows Path variable by default, we need the full path to outlook.exe to run it from a command prompt or the run line. The run line is found in the Windows start menu. Either in Start | Run or, as in Vista, Start | All Programs | Accessories | Run. You can also invoke the Run line with the Windows Key and the letter R as a keyboard shortcut. To launch a command prompt, you can run cmd.exe from the run line, or navigate to Start | All Programs | Accessories | Command Prompt.

    In either place, we need to either navigate to the folder where outlook.exe resides and launch it from there, or include the full path in the command. We will show the latter. The path has spaces in it, so for Windows to understand those spaces as part of the path, we need to put the whole path in quotes. An example using the /cleanviews switch would look as follows:

    c:\>"c:\program files\microsoft office\office12\outlook.exe" /cleanviews

    Figures 1 and 2 show the use of this command in the run line and a command prompt respectively.

  • slide 2 of 3


    Figure 1 - Run Outlook from Run LineFigure 2 - Run Outlook from a Command Prompt
  • slide 3 of 3

    Outlook Command-Line Switches

    There are numerous command line switches for Outlook 2007. Here are a few that I use fairly regularly, each addressing a specific need:

    /cleanviews - This switch resets any customization made in folder views. Sometimes this is easier than trying to change folders back to the default manually.

    /nopollmail - Sometimes I need to open Outlook quicky just to check some information. This switch prevents Outlook from checking servers for new mail at startup.

    /safe - This is the equivalent of starting Outlook in Safe Mode. It loads Outlook without any extensions or toolbar customization. It also turns off the preview pane. This is good for troubleshooting Outlook issues.

    /a “c:\logs\logfile.txt" - This switch creates a new message with a file attachment, in this case, logfile.txt. While Outlook is not the best solution for a command-line mailer, I have used this to script a solution to send log information through Exchange from a client with Outlook installed.

    For a complete list of command line switches, go to Microsoft Office Outlook help.