Command Line Switches in Outllook

When you launch a Microsoft Outlook, the startup process runs in a standard way that loads your configured profile with the necessary settings, add-ins and templates required. But suppose you want Outlook to customize the process by loading an add-in or running a macro upon startup. Outlook comes with lots of command-line switches and parameters which can be very handy for customisation as well as for troubleshooting.

While many of the command line switches in Outlook 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

In this article, we will provide an overview of all available command-line switches per Outlook version and how they can be used.


Using command line switches

You can directly execute command line switches in the following way:

  1. Open the Run command by pressing the Windows Logo + R on your keyboard or type in the Search field (Cortana) or open the Start Menu and directly start typing. This will automatically open the Search Pane which also allows for commands.
  2. In the box you opened in step 1, type; outlook.exe
  3. Press the SPACEBAR once, and then type a forward slash mark (/) followed by the switch you want to use (see the list below). For example, if you want to use the CleanReminders switch, the command you type in the Open box should look like this:
    outlook.exe /cleanreminders
  4. To run the command, click OK or press ENTER.\
command line switches outlook


Starting Outlook with the cleanreminders switch in Windows 10.

Command line switches in Outlook

The overview of command line switches in Outlook below is taken from various local and online help files of all Outlook versions and from KB articles discussing them. In the right column you’ll find to which Outlook version the command applies.

SwitchDescription
/a path:\<filename>Creates an item with the specified file as an attachment. Example:
"C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe" /a "C:\My Documents\labels.doc"
If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that aren’t based on Outlook.
/altvba <otmfilename>Opens the VBA program specified in otmfilename, rather than
%appdata%\Microsoft\Outlook\
VbaProject.OTM.
/autorun macronameOpens Outlook and immediately runs the macro specified in macroname.
(no longer supported after Outlook 2003 SP2)
/c <messageclass>Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).Examples:/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
/checkclientPrompts for the default manager of e-mail, news, and contacts.
/cleanautocompletecacheRemoves all names and e-mail addresses from the AutoComplete list.
/cleancategoriesDeletes any custom category names that you have created. Restores categories to the default names.
/cleanclientrulesStarts Outlook and deletes client-based rules.
/cleanconvongoingactionsDeletes 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.
/cleandmrecordsDeletes the logging records saved when a manager or a delegate declines a meeting.
/cleanfindersRemoves Search Folders from the Microsoft Exchange server store.
/cleanfreebusyClears and regenerates free/busy information. This switch can only be used when you are able to connect to your Microsoft Exchange server.
/cleanfromaddressRemoves all manually added From entries from the profile.
/cleanipsRestores receival of new messages in Exchange Cached mode (KB968773)
/cleanmailtipcacheRemoves all MailTips from the cache.
/cleanprofileRemoves invalid profile keys and recreates default registry keys where applicable.
/cleanpstLaunches Outlook with a clean Personal Folders file (.pst)
/cleanremindersClears and regenerates reminders.
/cleanroamedprefsAll previous roamed preferences are deleted and copied again from the local settings on the computer where this switch is used. This includes the roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.
/cleanrulesStarts Outlook and deletes client- and server-based rules.
/cleanschedplusDeletes all Schedule+ data (free/busy, permissions, and .cal file) from the server and enables the free/busy information from the Outlook Calendar to be used and viewed by all Schedule+ 1.0 users.
/cleanserverrulesStarts Outlook and deletes server-based rules.
/cleansharingRemoves all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings, but leaves all the previously downloaded content on your computer. This is useful if you cannot delete one of these subscriptions within Outlook 2010.
/cleansniffForce Outlook to reset the Sniffer Lock value to the computer on which the switch is used. The Sniffer Lock determines which of your computers processes the meeting items when you run Outlook on multiple computers a the same time. The lockout process helps prevent duplicate reminder messages.
/cleansubscriptionsDeletes the subscription messages and properties for subscription features.
/cleanweatherRemoves city locations added to the Weather Bar.
/cleanviewsRestores default views. All custom views you created are lost.
/designerStarts Outlook without figuring out if Outlook should be the default client in the first run.
/embedding <msgfilename>Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create.
/explorerOpens the new window in “explorer” mode (link bar on).
/f <msgfilename>Opens the specified message file (.msg) or Microsoft Office saved search (.oss).
(Support for oss-files has been dropped since Outlook 2003 SP2 due to security restrictions)
/finderOpens the Advanced Find dialog box.
/firstrunStarts Outlook as if it were run for the first time.
/folderOpens a new window in “folder” mode (Navigation Pane off).
/hol <holfilename.hol>Opens the specified .hol file.
/ical <icsfilename>Opens the specified .ics file.
/importNK2Imports the contents of an .nk2 file which contains the nickname list used by both the automatic name checking and Auto-Complete features. See: Import contacts from an nk2-file
/importprf path:\<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.
/l <olkfilename>Opens the specified .olk file.
/launchtraininghelp assetidOpens a Help window with the Help topic specified in assetid.
/m emailnameProvides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.
Example:
outlook.exe /c ipm.note /m emailname
/manageprofilesOpens the Mail Setup dialog to manage your Mail Profile and account settings outside of Outlook.
/nocustomizeStarts Outlook without loading outcmd.dat (customized toolbars) and *.fav file.
/noextensionsStarts Outlook with extensions turned off, but listed in the Add-In Manager.
/nopollmailStarts Outlook without checking mail at startup.
/nopreviewStarts Outlook with the Reading Pane off and removes the option from the View menu.
/p <msgfilename>Prints the specified message (.msg).
Prior to Outlook 2007, this does not work with HTML messages.
/pim <profilename>Creates a new Mail Profile with the specified name but without an email account.
See: Using Outlook without an email account.
/profile <profilename>Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (“).
/profilesOpens the Choose Profile dialog box regardless of the Options setting on the Tools menu.
/promptimportprf path:\<filename.prf>Same as /importprf except a prompt appears and the user can cancel the import.
/recycleStarts Outlook using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.
/regserverRewrites all Outlook specific registry keys and re-associates file extensions without having to reinstall Outlook or run setup with the /y switch. The settings are stored in the Outlook.srg file located in the same folder as the Outlook program.
/remigratecategoriesStarts Outlook and and initiates the following commands on the default mailbox:Upgrades colored For Follow Up flags to Office Outlook 2007 color categories.Upgrades calendar labels to Office Outlook 2007 color categories.Adds all categories used on non-mail items into the Master Category List.Note: This is the same command as Upgrade to Color Categories in each Outlook mailbox properties dialog box.
/remigrateconversations 
/resetfoldernamesResets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.For example, if you first connect to your mailbox Outlook using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language such as Japanese or English, you can use this switch to reset the default folder names after changing the user interface language or installing a different language version of Outlook.
/resetfoldersRestores missing folders for the default delivery location.
/resetformregionsEmpties the form regions cache and reloads the form region definitions from the Windows registry.
/resetoutlookbarRebuilds the Outlook Bar.
/resetnavpaneClears and regenerates the Navigation Pane for the current profile.
/resetquickstepsRestores the default Quick Steps. All user-created Quick Steps are deleted.
/resetsearchcriteriaResets all Instant Search criteria so that the default set of criteria is shown in each module.
/resetsharedfoldersRemoves all shared folders from the Navigation Pane.
/resettodobarClears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.
/restoreAttempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown.
/rpcdiagOpens Outlook and displays the remote procedure call (RPC) connection status dialog.
/rununittests 
/s <filename>Loads the specified shortcuts file (.fav).
/safeStarts Outlook without extensions, Reading Pane, or toolbar customization.
/safe:1Starts Outlook with the Reading Pane off.
/safe:2Starts Outlook without checking mail at startup.
/safe:3Starts Outlook with extensions turned off, but listed in the Add-In Manager.
/safe:4Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file.
/select foldernameStarts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar use:
"C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe" /select outlook:calendar
/share feed://URL/filename
/sharestssync://URL
/shareweb://URL/filename
Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a Microsoft Windows SharePoint Services 3.0 list to Outlook.
/sniffStarts 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 file.
/unregserverDeletes all registry keys and file associations for Outlook. Its actions are based on the Outlook.srg file located in the same folder as the Outlook application. Use the /regserver switch to rewrite the registry keys and file associations after using this switch.
/v <vcffilename>Opens the specified .vcf file.
/vcal <vcsfilename>Opens the specified .vcs file.
/x <xnkfilename>Opens the specified .xnk file.

Leave a Reply

Your email address will not be published. Required fields are marked *