You can control how Outlook starts by using command line switches. While many of the switches are used only when you are having problems with Outlook, including /cleanviews and /cleanreminders, several allow you to do things in Outlook from a command line, such as open a custom form using the /c switch:
outlook.exe /c ipm.contact.familyaddresses
Or open a new Outlook window to a specific folder:
outlook /select outlook:calendar
Many of the switches on this page will work in all versions of Outlook. Most of these switches will work with Outlook 2007.
One of my favorite tricks is creating shortcuts for new messages preaddressed to specific people that I frequently send messages to. The shortcut's command line accepts the email address, alias or resolvable name and looks like this:
"C:\Program Files\Microsoft Office\OFFICE14\OUTLOOK.EXE" /c ipm.note /m firstname.lastname@example.org;mary
You can create a Quick Launch or Desktop shortcut that opens a custom form, such as a While you were out phone message form, by replacing ipm.note with the published form name (i.e. ipm.note.wywo). (WYWO sample forms are available at Microsoft Sample Applications)
How to use Command line switches
If you're new to command line switches, at the Start Search field in Windows 7 and Vista or the Start menu, Run command (Windows key + R) type the application name (outlook, in this case), a space then the switch. In most cases, you only need "outlook", but outlook.exe or the full path to outlook.exe also work.
Replacing "switch" with the actual switch you want to use.
Then press Enter or click OK to start Outlook.
Occasionally you'll need to use the full path to Outlook, in which case, the command line will look like the following. If the path contains spaces you'll need to use parenthesis.
"C:\Program Files\Microsoft Office\Office14\Outlook.exe" /switch
You'll need to use the full file path if you are creating desktop shortcuts.
Outlook 2010 Command Lines
|/a c:\filename||Creates an item with the specified file as an attachment.
Outlook /a "C:\My Documents\labels.doc"
If no item type is specified, IPM.Note form is assumed. This switch cannot be used with message classes that aren’t based on Outlook forms
|/altvba otmfilename||Opens the VBA program specified in otmfilename, rather than
Use this switch when you need to run macros not in your VBAProject file.
Not supported in Outlook 2010 by default. You can create a registry value to enable it.
Data Value of 1 to enable the switch
|/c messageclass||Creates a new item of the specified message class, works for any valid MAPI form.
/c ipm.activity creates a Journal entry
/c ipm.appointment creates an appointment
/c ipm.contact creates a contact
/c ipm.note creates an e-mail message
/c ipm.stickynote creates a note
/c ipm.task creates a task
|/checkclient||Prompts for the default manager of e-mail, calendar, and contacts.|
|/cleanautocompletecache||Removes all names and e-mail addresses from the AutoComplete list.|
|/cleancategories||Deletes any custom category names that you have created. Restores categories to the default names.|
|/cleanclientrules||Starts Outlook and deletes client-based rules. Used by non-Exchange account users.|
|/cleanconvongoingactions||Deletes the Conversations Actions Table (CAT). CAT entries for a conversation thread usually expire 30 days after no activity. The command-line switch clears all conversation tagging, ignore, and moving rules immediately stopping any additional actions.|
|/cleanfinders||Removes Search Folders from the Microsoft Exchange server store.|
|/cleanfreebusy||Clears and regenerates free/busy information. This switch can only be used when you are able to connect to your Microsoft Exchange server.|
|/cleanfromaddress||Removes all addresses / accounts manually added to the From field.|
|/cleanips||Restores receiving new messages in Exchange Cached mode For more information, see When Outlook 2007 is running in Cached mode, users do not see some new e-mail messages (MSKB 968773)|
|/cleanreminders||Clears and regenerates reminders.|
|/cleanroamedprefs||All roamed preferences are deleted and copied from the local settings on the computer where this switch is used. Included are roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.|
|/cleanrules||Starts Outlook and deletes client- and server-based rules.|
|/cleanserverrules||Starts Outlook and deletes server-based rules. Used only with Exchange server accounts.|
|/cleansharing||Removes all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings. This does not delete content previously downloaded to your computer, it only removes the subscription.|
|/cleansniff||Deletes duplicate reminder messages.|
|/cleansubscriptions||Deletes the subscription messages and properties for subscription features. Used with SharePoint alerts|
|/cleanviews||Restores default views. Use with care as all custom views you created are lost|
|/embedding msgfilename||Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create.|
|/explorer||Opens the new window in “explorer” mode (link bar on).|
|/f msgfilename||Opens the specified message file (.msg)|
|/finder||Opens the Advanced Find dialog box.|
|/folder||Opens a new window in “folder” mode (Navigation Pane off).|
|/hol holfilename.hol||Opens the specified .hol file.|
|/ical icsfilename.ics||Opens the specified .ics file.|
|/importNK2||Imports the contents of an .nk2 file used by older versions of Outlook, which contains the "nickname" list that is used by the Auto-Complete features.|
|/importprf c:\filename.prf||Launches Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean launch.|
|/launchtraininghelp assetid||Opens a Help window with the Help topic specified in assetid.|
|/m emailname||Provides a way for the user to add an e-mail name to the item. Use either the full address or the alias. Only works in conjunction with the /c command-line parameter.
Outlook.exe /c ipm.note /m email@example.com
Outlook.exe /c ipm.note /m dianep
|/nopreview||Starts Outlook with the Reading Pane off.|
|/p msgfilename||Prints the specified message (.msg).|
|/profile profilename||Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks:
outlook.exe /profile "diane poremsky"
|/profiles||Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.|
|/promptimportprf||Same as /importprf except that a prompt appears, allowing the user to cancel the import.|
|/recycle||Starts Outlook using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.|
|/remigratecategories||Starts Outlook and upgrades colored For Follow Up flags to Outlook color categories, calendar labels to Office Outlook 2007 color categories. Also adds all categories used on non-mail items into the Master Category List.
Note: This is the same as Upgrade to Color Categories command.
|/resetfoldernames||Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language. For example, if you connect to your mailbox Outlook using a Russian user interface, the default folder names are in Russian and cannot be renamed. After changing the user interface language or installing a different language version of Outlook, you can use this switch to reset the default folder names.|
|/resetfolders||Restores missing folders for the default delivery location.|
|/resetformregions||Empties the form regions cache and reloads the form region definitions from the Windows registry.|
|/resetnavpane||Clears and regenerates the Navigation Pane for the current profile. Removes all Shortcuts and Favorite Folders. Has the same effect as deleting profilename.xml in your user directory.|
|/resetquicksteps||Restores the default Quick Steps. All user-created Quick Steps are deleted.|
|/resetsearchcriteria||Resets all Instant Search criteria so that the default set of criteria is shown in each module.|
|/resetsharedfolders||Removes all shared folders from the Navigation Pane.|
|/resettodobar||Clears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.|
|/restore||Attempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown.|
|/rpcdiag||Opens Outlook and displays the remote procedure call (RPC) connection status dialog.|
|/safe||Starts Outlook without extensions, Reading Pane, or toolbar customization. Same as holding Ctrl while clicking the Outlook shortcut.|
|/safe:1||Starts Outlook with the Reading Pane off.|
|/safe:3||Starts Outlook with extensions turned off, but listed in the Add-In Manager.|
|/select foldername||Starts Outlook and opens the specified folder in a new window.
Usage: "C:\Program Files\Microsoft Office\Office14\Outlook.exe" /select outlook:calendar
outlook /select "outlook:Inbox\Old Messages"
|/share //URL||Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a Microsoft Windows SharePoint Services list to Outlook.
|/sniff||Starts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.|
|/t oftfilename||Opens the specified .oft (template) file.|
|/v vcffilename||Opens the specified .vcf file.|
|/vcal vcsfilename||Opens the specified .vcs file.|