70+ Outlook Command Line Switches you Should use Right Away
Command-line switches will help you automate Outlook
11 min. read
Updated on
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.
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
- Press the Windows key + R to bring up the Run dialog box.
- 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.
- 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
- Press the Windows key, type outlook, right-click on Outlook, and select Open file location.
- Right-click the Outlook.exe file and select Send to.
- Now, choose Desktop (Create shortcut) on the list. This will create an Outlook shortcut on your desktop.
- Next, right-click the newly created shortcut and select Properties.
- Click the Shortcut tab at the top.
- 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
- 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
Switch | Description | Compatible 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 macro | Runs 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 |
/checkclient | Prompts e-mail, news, and contacts default manager | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
CLEAN SWITCHES | ||
/cleanautocompletecache | Deletes all the names and e-mail addresses on the AutoComplete list. | 2010, 2013, 2016, 2019, 2021, 365 |
/cleancategories | It restores the categories to their default names and deletes any custom category names you created. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanclientrules | Launches Outlook and removes client-based rules. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanconvongoingactions | Conversations 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 |
/cleandmrecords | Cleans the logging records saved when a manager or a delegate declines a meeting. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanfinders | Clears the Search folders from the Microsoft Exchange server store. | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanfreebusy | Cleans and regenerates the free/busy information. Only available when you can connect to your Microsoft Exchange server. | 2000, 2002/XP, 2003, 2007, 2010 |
/cleanfromaddress | Deletes all manually created From entries from the profile. | 2010, 2013, 2016, 2019, 2021, 365 |
/cleanips | Helps to restore the receival of new messages in Exchange Cached mode. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanmailtipcache | Cleans all MailTips from the cache. | 2010, 2013, 2016, 2019, 2021, 365 |
/cleanprofile | Deletes any invalid profile keys and recreates the default registry keys if necessary. | 2003, 2007 |
/cleanpst | Starts Outlook with a clean .pst () file. | 2003 |
/cleanreminders | Deletes and regenerates the reminders. | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanroamedprefs | This 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 |
/cleanrules | Launches Outlook and removes client- and server-based rules. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanschedplus | Removes 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 |
/cleanserverrules | Launches Outlook and removes the server-based rules. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleansharing | This 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 |
/cleansniff | This 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 |
/cleansubscriptions | Removes subscription messages and properties for the subscription features. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/cleanweather | Deletes the city locations added to the Weather Bar. | 2013, 2016, 2019, 2021, 365 |
/designer | It 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 |
/explorer | Launches Outlook in Explorer mode. | 2000, 2002/XP, 2003, 2007 |
/f msgfilename | Launches the specified message file (.msg) or the Office saved search (.oss). | 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/finder | Launches the Advanced Find dialog box in Outlook. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/firstrun | Opens Outlook as it would be at the first run. | 2003, 2007 |
/folder | This switch starts a new window in folder mode without the navigation pane. | 2000, 2002/XP, 2003, 2007 |
/hol holfilename.hol | Launches 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 |
/importNK2 | This 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.prf | Launches 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 assetid | Launches a Help window and displays the topic you specify in assetid. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/m emailname | Helps 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 emailname | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/manageprofiles | Helps 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) |
/nocustomize | Launches Outlook without customization features such as outcmd.dat and *.fav file. | 2003, 2007 |
/noextensions | It disables the extensions on startup but still lists them in the Add-In Manager. | 2003, 2007 |
/nopreview | Launches Outlook without the Reading Pane. | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/p msgfilename | This switch will print the specified message file (.msg). | 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/pim profilename | Helps 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 profilename | Launches 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 |
/profiles | This 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.prf | Works 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 |
/recycle | If 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 |
/remigratecategories | Launches 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 |
/remigrateconversations | 2010, 2013, 2016, 2019, 2021, 365 | |
RESET SWITCHES | ||
/resetfoldernames | The 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 |
/resetfolders | Restore the missing folders for the default delivery location. | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/resetformregions | Empties the cache for form regions and reloads the form region definitions from Windows Registry. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/resetoutlookbar | Rebuilds the Outlook Bar. | 2000, 2002/XP |
/resetnavpane | Clears and regenerates the navigation pane for the profile you are using currently. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/resetquicksteps | Restores the default Quick Steps. All user-created Quick Steps are deleted. | 2010, 2013, 2016, 2019, 2021, 365 |
/resetsearchcriteria | Resets all Instant Search criteria so that the default set of criteria is shown in each module. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/resetsharedfolders | Removes all shared folders from the Navigation Pane. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/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. | 2007, 2010, 2013, 2016, 2019, 2021, 365 |
Other important command line switches
Switch | Description | Compatible Outlook versions |
/restore | Attempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown. | 2010, 2013, 2016, 2019, 2021, 365 |
/rpcdiag | Opens 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 |
/safe | Starts Outlook without extensions, Reading Pane, or toolbar customization. | 2000, 2002/XP, 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/safe:1 | Starts Outlook with the Reading Pane off. | 2003, 2007, 2010, 2013, 2016, 2019, 365 |
/safe:2 | Starts Outlook without checking mail at startup. | 2003 |
/safe:3 | Starts Outlook with extensions turned off, but listed in the Add-In Manager. | 2003, 2007, 2010, 2013, 2016, 2019, 2021, 365 |
/safe:4 | Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file. | 2003, 2007 |
/select foldername | Starts 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 |
/sniff | Starts 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 |
/unregserver | Deletes 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.
User forum
0 messages