70+ Outlook Command Line Switches you Should use Right Away

Command-line switches will help you automate Outlook

Reading time icon 11 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Key notes

  • Outlook command line switches will help you automate a lot of actions and start the email client exactly as you need.
  • We have created a comprehensive list with command line switches for Outlook that you can use right now.
Best Outlook command line switches for automation

Outlook is a top-notch email client used by professionals and IT admins. Behind just the normal use of sending and receiving emails is the ability to customize and simplify tasks.

One of the tools you can use to ease your tasks is a command-line switch. These commands allow you to perform a series of tasks without accessing Outlook.

In this guide, we will detail everything you need to know about command-line switches and how to take advantage of them.

What are switches in command line?

Command-line switches are modifiers added to the end of the .exe file of an Office program for automation purposes. They can also be used for troubleshooting, like clearing error messages.

They are only used in the startup of Outlook and any other Office files where they are needed. A standard command-line switch format should be made up of a forward slash and a word showing what the switch does.

An example is the Outlook command-line switch below: outlook.exe /nopreview.

With the switch above, Outlook will open without the Reading pane. Also, there are times when the switch will have additional instructions called parameters to provide detailed information on how the Office program will be opened.

How do I use Outlook switches?

1. Using Run to use a switch once

  1. Press the Windows key + R to bring up the Run dialog box.
  2. Now, type a quotation mark (โ€œ), followed by the path of Outlook.exe on your PC. If you donโ€™t know the path, click the Browse button and navigate to the location of Outlook.exe on your PC.
  3. Next, close the quotation mark, then type space, followed by the command-line switch, as shown in the example below: "c:\program files\microsoft office\office15\outlook.exe" /nopreview

With the Outlook command-line switch above, you can open Outlook without showing the Reading page. Note that this works just once, and Outlook will normally open the next time you open it.

To keep using the switch, you will have to repeat the steps above.

If you ever encounter an Outlook script error, follow the solutions in the highlighted guide to fix it.

2. Creating a custom switch

  1. Press the Windows key, type outlook, right-click on Outlook, and select Open file location.
  2. Right-click the Outlook.exe file and select Send to.
  3. Now, choose Desktop (Create shortcut) on the list. This will create an Outlook shortcut on your desktop.
  4. Next, right-click the newly created shortcut and select Properties.
  5. Click the Shortcut tab at the top.
  6. From here, go to the Target field and type space at the end of the path there, followed by the command-line switch, as shown below: "c:\program files\microsoft office\office16\outlook.exe" /nopreview
  7. Finally, click the Apply and OK buttons.

With this, you should be able to repeatedly use this custom command-line switch to open Outlook without the Reading page.

Here are some important things you need to know about command-line switches:

  • You cannot use multiple switches with Outlook at a time.
  • There is no need to worry about letter cases when typing switches, as they are not case-sensitive. The same goes for parameters.
  • It is important to always include a blank space before every switch and parameter.
  • If you are trying to use a parameter that is a file on your PC, always enclose it in double quotation marks.

Knowing all that, let’s see the complete list of command line switches you may apply to Outlook.

Comprehensive list of command line switches

SwitchDescriptionCompatible Outlook versions
/a โ€œ<filepath>โ€The switch creates a new item and attaches a file from a path. You can’t use the switch for message classes that are not based on Outlook. Also, if the item type is not specified, the default IPM.Note will be applied.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/altvba <otmfilename>Opens the VBA program in the otmfilename, instead of what is in %appdata%\Microsoft\Outlook\VbaProject.OTM.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/autorun macroRuns the macro specified upon launching Outlook.2003
/c <messageclass>Creates a new item of the message class you specify and other valid MAPI form). For example:
/c ipm.appointment – to create an appointment
/c ipm.contact – to create a contact
/c ipm.note – to create an email message
/c ipm.stickynote – to create a note
/c ipm.task – to create a task
2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/checkclientPrompts e-mail, news, and contacts default manager2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
CLEAN SWITCHES
/cleanautocompletecacheDeletes all the names and e-mail addresses on the AutoComplete list.2010, 2013, 2016, 2019, 2021, 365
/cleancategoriesIt restores the categories to their default names and deletes any custom category names you created.2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanclientrulesLaunches Outlook and removes client-based rules.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanconvongoingactionsConversations Actions Table (CAT) entries for all conversation threads, including the tagging, ignore, and moving rules immediately stopping any additional actions. The CAT entries expire in 30 days if there are no activities.2010, 2013, 2016, 2019, 2021, 365
/cleandmrecordsCleans the logging records saved when a manager or a delegate declines a meeting.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanfindersClears the Search folders from the Microsoft Exchange server store.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanfreebusyCleans and regenerates the free/busy information. Only available when you can connect to your Microsoft Exchange server.2000, 2002/XP, 2003, 2007, 2010
/cleanfromaddressDeletes all manually created From entries from the profile.2010, 2013, 2016, 2019, 2021, 365
/cleanipsHelps to restore the receival of new messages in Exchange Cached mode.2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanmailtipcacheCleans all MailTips from the cache.2010, 2013, 2016, 2019, 2021, 365
/cleanprofileDeletes any invalid profile keys and recreates the default registry keys if necessary.2003, 2007
/cleanpstStarts Outlook with a clean .pst () file.2003
/cleanremindersDeletes and regenerates the reminders.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanroamedprefsThis switch deletes all previously roamed preferences and copies them again from the local settings on your computer. This contains the roaming settings for working hours, RSS rules, free/busy grid, and calendar publishing.2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanrulesLaunches Outlook and removes client- and server-based rules.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanschedplusRemoves all Schedule+ data from the server and it activates the free/busy data on the Outlook Calendar, which is to be used and seen by Schedule+ 1.0 users.2000, 2002/XP, 2003
/cleanserverrulesLaunches Outlook and removes the server-based rules.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleansharingThis switch will delete all SharePoint subscriptions, Internet Calendar, and RSS, from your Account Settings. However, it will leave the downloaded content on your computer. This comes in handy if you cannot remove these subscriptions from Outlook 2013.2010, 2013, 2016, 2019, 2021, 365
/cleansniffThis switch helps to override the programmatic lockout that selects the computer to process meeting items. The purpose of this lockout is to ensure that there are no duplicate reminder messages. However, it helps you clear the lockout on your computer and allow it to process meeting items.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleansubscriptionsRemoves subscription messages and properties for the subscription features.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/cleanweatherDeletes the city locations added to the Weather Bar.2013, 2016, 2019, 2021, 365
/designerIt overrides the default client check in the first run and opens Outlook.2003
/embedding <msgfilename>Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/explorerLaunches Outlook in Explorer mode.2000, 2002/XP, 2003, 2007
/f msgfilenameLaunches the specified message file (.msg) or the Office saved search (.oss).2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/finderLaunches the Advanced Find dialog box in Outlook.2007, 2010, 2013, 2016, 2019, 2021, 365
/firstrunOpens Outlook as it would be at the first run.2003, 2007
/folderThis switch starts a new window in folder mode without the navigation pane.2000, 2002/XP, 2003, 2007
/hol holfilename.holLaunches the specified .hol file.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/ical <icsfilename>Launches the specified .ics file.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/importNK2This switch imports the contents of an .nk2 file. This file contains the nickname list used by both the automatic name-checking and Auto-Complete features.2010, 2013, 2016, 2019, 2021, 365
/importprf filename.prfLaunches Outlook and imports the specified MAPI profile (*.prf). But if Outlook is already open, it will queue the profile you want to import for the next clean start.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/l <olkfilename>Launches the specified .olk file.2003
/launchtraininghelp assetidLaunches a Help window and displays the topic you specify in assetid.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/m emailnameHelps you add an e-mail name to the item and will only work with the /c command-line parameter. For example, outlook.exe /c ipm.note /m emailname2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/manageprofilesHelps you manage your account settings and Mail Profile outside the Outlook app by opening the Mail Setup dialog.2016, 2019, 2021, 365 (Build 1806 and later)
/nocustomizeLaunches Outlook without customization features such as outcmd.dat and *.fav file.2003, 2007
/noextensionsIt disables the extensions on startup but still lists them in the Add-In Manager.2003, 2007
/nopreviewLaunches Outlook without the Reading Pane.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/p msgfilenameThis switch will print the specified message file (.msg).2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/pim profilenameHelps you create a new mail profile with the name written in profilename. The mail profile will not have an email account so you will have to create one.2016, 2019, 2021, 365
/profile profilenameLaunches the specified profile. You will need to include the profile name in quotation marks if it contains a space.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/profilesThis switch will open the Choose Profile dialog box irrespective of the Options setting saved in the Tools menu.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/promptimportprf filename.prfWorks similarly to /importprf. The only difference is that it shows a prompt with which you can cancel the import.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/recycleIf you have an existing Outlook window, this switch will start with it. It is usually used with /explorer or /folder.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/remigratecategoriesLaunches Outlook and performs the following commands: – Updates colored For Follow Up flags to Office Outlook 2013 color categories
– Updates calendar labels to Office Outlook 2013 color categories
– Adds all categories used on non-mail items into the Master Category List.
This switch is very similar to Upgrade to Color Categories but for each Outlook mailbox.
2007, 2010, 2013, 2016, 2019, 2021, 365
/remigrateconversations2010, 2013, 2016, 2019, 2021, 365
RESET SWITCHES
/resetfoldernamesThe switch is resetting the default folder names to default names in the current Office user interface language. For instance, if you first connect to your mailbox Outlook using a Frech user interface, the French default folder names cannot be renamed. This switch helps you change the default folder names to another language after changing the user interface language or if you install Outlook in a different language.2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/resetfoldersRestore the missing folders for the default delivery location.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/resetformregionsEmpties the cache for form regions and reloads the form region definitions from Windows Registry.2007, 2010, 2013, 2016, 2019, 2021, 365
/resetoutlookbarRebuilds the Outlook Bar.2000, 2002/XP
/resetnavpaneClears and regenerates the navigation pane for the profile you are using currently.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/resetquickstepsRestores the default Quick Steps. All user-created Quick Steps are deleted.2010, 2013, 2016, 2019, 2021, 365
/resetsearchcriteriaResets all Instant Search criteria so that the default set of criteria is shown in each module.2007, 2010, 2013, 2016, 2019, 2021, 365
/resetsharedfoldersRemoves all shared folders from the Navigation Pane.2007, 2010, 2013, 2016, 2019, 2021, 365
/resettodobarClears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.2007, 2010, 2013, 2016, 2019, 2021, 365

Other important command line switches

SwitchDescriptionCompatible Outlook versions
/restoreAttempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown.2010, 2013, 2016, 2019, 2021, 365
/rpcdiagOpens Outlook and displays the remote procedure call (RPC) connection status dialog.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/rununittests 2013, 2016, 2019, 2021, 365
/s <filename>Loads the specified shortcuts file (.fav).2002/XP, 2003
/safeStarts Outlook without extensions, Reading Pane, or toolbar customization.2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/safe:1Starts Outlook with the Reading Pane off.2003, 2007, 2010, 2013, 2016, 2019, 365
/safe:2Starts Outlook without checking mail at startup.2003
/safe:3Starts Outlook with extensions turned off, but listed in the Add-In Manager.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/safe:4Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file.2003, 2007
/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
2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/share feed://URL/filename
/share stssync://URL
/share web://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.2007, 2010, 2013, 2016, 2019, 2021, 365
/sniffStarts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/t <oftfilename>Opens the specified .oft file.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/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.2000, 2002/XP
/v <vcffilename>Opens the specified .vcf file.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/vcal <vcsfilename>Opens the specified .vcs file.2003, 2007, 2010, 2013, 2016, 2019, 2021, 365
/x <xnkfilename>Opens the specified .xnk file.2003, 2007

There you are! Now you have a complete list of Outlook command line switches you may use to configure the app to start exactly as you want to.

You may also be interested in reading our guides on how to remove external tags in Outlook or how to remove RSS feeds from Outlook.

If Outlook is now showing the subject, the highlighted guide will help you fix the problem quickly.

For any other questions or suggestions, feel free to leave a message in the comments section below.

More about the topics: Outlook Guides

User forum

0 messages