The command line interface can be intimidating, especially for users who aren’t particularly familiar with it. However, it can also offer up major benefits if you’re willing to take some time to learn the ropes.
Command line switches can be used in Outlook to perform all kinds of operations. Whether you’re troubleshooting a problem, or just trying to speed up your normal usage, these switches offer serious advantages — and they’re not at all difficult to put into action, once you know how.
Here are 25 command line switches for Outlook to get started with.
Introduction to Run Commands
The easiest way to input a command line switch is by using a Run command, which is essentially a single-line version of the full command line interface.
In Windows 10, you can open a new Run command by typing Run into the search bar, or by using the shortcut Windows key + R.
You should be presented this window — simply input your desired switch into the Open field and press Enter to execute it.
Command line switches can be used to expedite the process of sending emails. To compose a new message, enter the following into the Run dialog:
outlook.exe /c ipm.note
It’s also possible to add the name of the email’s recipient by adding an extra
/m switch onto the end of the command:
outlook.exe /c ipm.note /m email@example.com
The above command yields the following result:
We can even add an attachment by using the
/a switch and specifying its disk location:
outlook.exe /m firstname.lastname@example.org /a "C:\My Documents\deathstarplans.pdf"
Which results in the following email draft:
You may have noticed that we omitted the
ipm.note switch from the previous command. Unless Outlook receives specific instructions to attach the file to a different type of item, the program will assume that the user is trying to draft an email, so in this case the switch is superfluous. To attach content to a different item, such as a task, we simply need to add another switch to the command.
Creating Other Items
By modifying the last element in the command used to send an email, we can can create a variety of other commonly used Outlook items:
ipm.contact— Creates a new contact.
ipm.stickynote— Creates a new note.
ipm.task— Creates a new task.
ipm.appointment— Creates a new appointment.
ipm.activity— Creates a new journal entry.
Cleaning Up Outlook
Anyone who’s worked as a system administrator will be able to confirm that certain users have an unbridled capacity to wreak havoc on their email client. Whether they’ve been fiddling with settings that should go untouched, or simply stockpiling pointless reminders that clog up the works, cleaning up this kind of mess can be a frustrating process.
Fortunately, we can use switches to clean up some aspects of Outlook without even touching the program itself. The following command will remove all names and email addresses from the Autocomplete register:
There are plenty of other things that we can clean in Outlook by switching out
/cleanautocompletecache for another switch:
/cleancategories— Deletes any custom category names and restores category names to their default labels.
/cleanclientrules— Deletes client-based rules.
/cleanserverrules— Deletes server-based rules.
/cleanrules— Deletes both client-based and server-based rules.
/cleanreminders— Clears and regenerates reminders.
/cleanviews— Deletes any custom views and restores the defaults.
Opening and Finding Files
Switches can be used to open individual files in Outlook without having to navigate through an email inbox. The following command will open either a message file using the MSG format, or a saved search that uses the OSS format — just sub out “file-name”.
outlook.exe /f file-name
We can also swap out
/hol to open a HOL file, and
/ical to open an ICS file.
However, sometimes you might not have the file name of the content that we’re looking for to hand. In this situation, you can use the
/finder switch like this:
This will produce the window below, which can be used as a powerful search tool to find just about anything hidden away in Outlook.
Initializing Outlook from a Run command might shave a few seconds off the process, but that’s not the only reason you might want to use this technique. By taking advantage of switches, you can open Outlook and perform other useful tasks at the same time.
Enter the following into a Run dialog to open up Outlook with the Reading Pane disabled:
We can switch out
/safe to disable both the Reading Pane and any active toolbar customizations.
Alternatively, we can initialize Outlook and open a specific folder by using the following command:
outlook.exe /select folder-name
Just replace “folder-name” with the title of a particular folder, or a reference like
One especially time-saving switch is
/sniff, which opens Outlook, looks for new meeting requests in the inbox, and adds anything it finds to the calendar.
We use it like this:
In the event that Outlook crashes, there’s a switch that can attempt to open the same profile and folders that were active before the event:
Finally, if you want to initialize Outlook by using an Outlook window that’s already open (if one exists), you can use this command:
Further Steps Into the Command Line Interface
Once you’ve used a few of these switches with Outlook, you’ll hopefully find that the command line isn’t as fearsome as it looks from a distance.
Getting to grips with the concept of inputting commands is the first step toward carrying out more complex tasks from the command line. Next, why not try using it to choose the perfect emoji, take control of your network, or speed up some common Windows processes.
The command line is a very powerful tool, and with a little bit of experience, you’ll soon be using it to your advantage.
Do you have another command line switch for Outlook that you want to share with other users? Join the conversation in the comments section below.