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.