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
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\root\Office16\OUTLOOK.EXE" /c ipm.note /m someone@slipstick.com;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, you can either use the Start menu, Run command (Windows key + R) or click in the Search box in the taskbar (or click on the Start menu, if you aren't showing the search field) and 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. Tip: if you are using a switch you'll use again, use the Run command as it will add it to the most recently used list. You'll be able to select it from the list instead of retyping it.
Outlook /switch
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\root\Office16\Outlook.exe" /switch
You'll need to use the full file path if you are creating desktop shortcuts. The default location for the "click to run" versions when Outlook and Windows are both either 32-bit or 64-bit is
C:\Program Files\Microsoft Office 15\root\office15\outlook.exe
If you are using 32-bit Office on 64-bit windows, the Office applications are in the x86 path:
C:\Program Files (x86)\Microsoft Office 15\root\office15\outlook.exe
Corporate users with volume licenses will find the Office applications in one of these paths:
C:\Program Files\Microsoft Office\office15\outlook.exe
C:\Program Files (x86)\Microsoft Office\office15\outlook.exe
You'll need to use the full file path if you are creating desktop shortcuts.
For a video tutorial, see Command Line Switches Tutorial
Popular and Useful Switches
These switches work in all versions of Outlook.
| Switch | Description |
|---|---|
| /Safe | Opens Outlook in Safe mode (Alternately, you can hold Ctrl as you click on the Outlook icon to start in Safe mode.) |
| /cleanviews | Resets the views to Outlook's default views. Note: this will delete all custom views you may be using. |
| /resetnavpane | Use when Outlook won't open. This resets Outlook's navigation pane to the default settings. Error Message: Cannot start Microsoft Office Outlook |
| /select foldername | Starts Outlook and opens the specified folder in a new window. Usage: "C:\Program Files\Microsoft Office\Office12\Outlook.exe" /select outlook:calendar outlook /select "outlook:Inbox\Old Messages" |
| /profile profilename | Create a shortcut using this switch when you have multiple profiles to load the specified profile. If your profile name contains a space, enclose the profile name in quotation marks. |
| /cleanreminders | Use when dismissed reminders keep coming back. Delete reminders that keep returning |
| /resettodobar | Deletes and recreates the To-Do Bar task list for the current profile. The To-Do Bar search folder is also deleted and re-created. Outlook 2007 and Outlook 2010 only. Error with the To-Do Bar's Task list |
All Command Line switches
This table lists all of the switches available for Outlook 2007, 2010, 2013, 2016, 2019, and 365.
| Switch | Description | Supported Version |
|---|---|---|
| /a c:\pathto\filename | Creates an item with the specified file as an attachment. Usage: Outlook /a "D:\Documents\labels.docx" 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 | 2007, 2010, 2013, 2016, 2019, 365 |
| /altvba otmfilename | Opens the VBA program specified in otmfilename, rather than %appdata%\Microsoft\Outlook\VbaProject.OTMUse 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. HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\Outlook\Security DWORD: EnableAltVba Data Value of 1 to enable the switch | 2007, 2010, 2013, 2016, 2019, 365 |
| /c messageclass | Creates a new item of the specified message class, works for any 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 | 2007, 2010, 2013, 2016, 2019, 365 |
| /checkclient | Prompts for the default manager of email, calendar, and contacts. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanautocompletecache | Removes all names and email addresses from the AutoComplete list. | 2010, 2013, 2016, 2019, 365 |
| /cleancategories | Deletes any custom category names that you have created. Restores categories to the default names. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanclientrules | Starts Outlook and deletes client-based rules. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. | 2010, 2013, 2016, 2019, 365 |
| /cleandmrecords | Deletes the logging records saved when a manager or a delegate declines a meeting. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanfinders | Removes Search Folders from the Microsoft Exchange server store. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanfreebusy | Clears and regenerates free/busy information. This switch can only be used when you are able to connect to your Microsoft Exchange server. | 2007, 2010 |
| /cleanfromaddress | Removes all addresses / accounts manually added to the From field. | 2010, 2013, 2016, 2019, 365 |
| /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) | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanmailtipcache | Removes all MailTips from the cache. | 2010, 2013, 2016, 2019, 365 |
| /cleanprofile | Removes invalid profile keys and recreates default registry keys where applicable. | 2007 |
| /cleanreminders | Clears and regenerates reminders. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanroamedprefs | All 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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanrules | Starts Outlook and deletes client- and server-based rules. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanserverrules | Starts Outlook and deletes server-based rules. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. | 2010, 2013, 2016, 2019, 365 |
| /cleansniff | This forces 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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleansubscriptions | Deletes the subscription messages and properties for subscription features. Used with SharePoint alerts | 2007, 2010, 2013, 2016, 2019, 365 |
| /cleanweather | Removes city locations added to the Weather Bar. | 2013, 2016, 2019, 365 |
| /cleanviews | Restores default views. Use with care as all custom views you created are lost | 2007, 2010, 2013, 2016, 2019, 365 |
| /embedding msgfilename | Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create. | 2007, 2010, 2013, 2016, 2019, 365 |
| /explorer | Opens the new window in “explorer” mode (link bar on). | 2007 |
| /f msgfilename | Opens the specified message file (.msg). | 2007, 2010, 2013, 2016, 2019, 365 |
| /finder | Opens the Advanced Find dialog box. | 2007, 2010, 2013, 2016, 2019, 365 |
| /firstrun | Starts Outlook as if it were run for the first time. | 2007 |
| /folder | Opens a new window in “folder” mode (Navigation Pane off). | 2007 |
| /hol holfilename.hol | Opens the specified .hol file. | 2007, 2010, 2013, 2016, 2019, 365 |
| /ical icsfilename | Opens the specified .ics file. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. | 2010, 2013, 2016, 2019, 365 |
| /importprf c:\pathto\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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /launchtraininghelp assetid | Opens a Help window with the Help topic specified in assetid. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. Usage: Outlook.exe /c ipm.note /m test@slipstick.com Outlook.exe /c ipm.note /m dianep | 2007, 2010, 2013, 2016, 2019, 365 |
| /manageprofiles | Opens the Mail Setup dialog to manage your Mail Profile and account settings outside of Outlook. | 2016, 2019, 365 (New as of Build 1806) |
| /nocustomize | Starts Outlook without loading outcmd.dat (customized toolbars) and *.fav file. | 2007 |
| /noextensions | Starts Outlook with extensions turned off, but listed in the Add-In Manager. | 2007 |
| /nopreview | Starts Outlook with the Reading Pane off and removes the option from the View menu. | 2007, 2010, 2013, 2016, 2019, 365 |
| /p msgfilename | Prints the specified message (.msg). | 2007, 2010, 2013, 2016, 2019, 365 |
| /pim profilename | Creates a new Mail Profile with the specified name but without an email account. | 2016, 2019, 365 |
| /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" | 2007, 2010, 2013, 2016, 2019, 365 |
| /profiles | Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu. | 2007, 2010, 2013, 2016, 2019, 365 |
| /promptimportprf C:\pathto\filename.prf | Same as /importprf except a prompt appears and the user can cancel the import. | 2007, 2010, 2013, 2016, 2019, 365 |
| /recycle | Starts Outlook using an existing Outlook window, if one exists. Used in combination with /explorer or /folder. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /remigrateconversations | 2010, 2013, 2016, 2019, 365 | |
| /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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /resetfolders | Restores missing folders for the default delivery location. | 2007, 2010, 2013, 2016, 2019, 365 |
| /resetformregions | Empties the form regions cache and reloads the form region definitions from the Windows registry. | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. | 2007, 2010, 2013, 2016, 2019, 365 |
| /resetquicksteps | Restores the default Quick Steps. All user-created Quick Steps are deleted. | 2010, 2013, 2016 |
| /resetsearchcriteria | Resets all Instant Search criteria so that the default set of criteria is shown in each module. | 2007, 2010, 2013, 2016, 2019, 365 |
| /resetsharedfolders | Removes all shared folders from the Navigation Pane. | 2007, 2010, 2013, 2016, 2019, 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, 365 |
| /restore | Attempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown. | 2010, 2013, 2016, 2019, 365 |
| /rpcdiag | Opens Outlook and displays the remote procedure call (RPC) connection status dialog. | 2007, 2010, 2013, 2016, 2019, 365 |
| /rununittests | 2013, 2016, 2019, 365 | |
| /safe | Starts Outlook without extensions, Reading Pane, or toolbar customization. Same as holding Ctrl while clicking the Outlook shortcut. | 2007, 2010, 2013, 2016, 2019, 365 |
| /safe:1 | Starts Outlook with the Reading Pane off. | 2007, 2010, 2013, 2016, 2019, 365 |
| /safe:3 | Starts Outlook with extensions turned off, but listed in the Add-In Manager. | 2007, 2010, 2013, 2016, 2019, 365 |
| /safe:4 | Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file. | 2007 |
| /select foldername | Starts Outlook and opens the specified folder in a new window. Usage: "C:\Program Files\Microsoft Office\root\Office16\Outlook.exe" /select outlook:calendar outlook /select "outlook:Inbox\Old Messages" | 2007, 2010, 2013, 2016, 2019, 365 |
| /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. Examples: /share feed://URL/filename /share stssync://URL/filename /share web://URL/files | 2007, 2010, 2013, 2016, 2019, 365 |
| /sniff | Starts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar. | 2007, 2010, 2013, 2016, 2019, 365 |
| /t oftfilename | Opens the specified .oft (template) file. | 2007, 2010, 2013, 2016, 2019, 365 |
| /v vcffilename | Opens the specified .vcf file. | 2007, 2010, 2013, 2016, 2019, 365 |
| /vcal vcsfilename | Opens the specified .vcs file. | 2007, 2010, 2013, 2016, 2019, 365 |
| /x xnkfilename | Opens the specified .xnk file. See .XNK Extension error: "Cannot Open File". | 2007 |
More Information
For a video tutorial, see Command Line Switches Tutorial
kiran lagvankar says
while opening the outlook.exe with a new email from command prompt, how to move the .text file content to body of the email?
Diane Poremsky says
There is not a way to read the text file into the body using a simple command line - you need to use a script (VBScript will work, or PowerShell) to read the text file and insert it into the body using mailto:.
something like this... which I have not tested. It might not insert the text (inserting the word content instead) and you would need to use the script to open the message then insert the text.
Const ForReading = 1
Dim file, content
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile("C:\test.txt", ForReading)
content = file.ReadAll
mailto:alias@domain?subject=test&cc=test@domain&body=content
Dimi Lemits says
Amazing information !
Thanks
emmel says
I think this is a "switch" issue fixable in the registry--I have Outlook 2010.
When a recent "search" oddly crashed it and it wouldn't reopen even after running the built in scan pst fixer (it got hung on profile) I used the windows repair tool to fix it--Indeed it fixed it except for one bizarre bug I cannot fix myself. Double copies of Outlook!
So I always leave Outlook open. When I'm in any browser and choose "send to" to send a link to my email--what now happens is a brand new iteration of Outlook (i.e. outlook.exe) is opened PLUS an email window. I don't want two iterations of Outlook running, just one. I just want the email window open within the single copy of open Outlook.
Making sense here?
Normally when I click on "send to email" ONLY a new email window (only) opens--not a full iteration of outlook. Clearly Microsoft Office fix "fixed" something that wasn't broken
How can I fix this? thanks!
Diane Poremsky says
Either the shortcut was changed - you can make a shortcuts and add /recycle switch to the path. If you are hiding Outlook when minimized, it will open a new copy if you don't open it from the tray.
What I would do first is a quick repair - this will fix shortcuts - and if its still a problem, update the shortcut. Instructions are in this articles:
https://www.slipstick.com/outlook/one-version-outlook-run-time/
https://www.slipstick.com/outlook/start-outlook-minimized-or-minimize-to-tray/
Joy says
I can't seem to get Outlook to completely open when I use even just one switch. I don't get an error. It just hangs indefinitely. Any ideas why? I'm using Outlook 365 on Windows 10. Thanks for any help. I'm an instructor and I used to love being able to reset the student workstations after the training, but now I can't.
Diane Poremsky says
What switch are you using? Although without an error, its impossible to know why its not working. I would set up Outlook (and all of office, if you are also training for all apps) how you want it for new students - no profile, default settings then export the registry key. Import / run the reg file on all the computers to reset.
John says
Hi Diane, thanks for this! I have need to combine switches thus
start outlook /Profile Fred /c ipm.note /m accounts@media.com?subject=New_invoice_to_issue
start outlook /Profile Fred works, but I have to add the address and subject
start outlook /c ipm.note /m accounts@media.com?subject=New_invoice_to_issue works mut I have to pick the profile
How do I get both please
Diane Poremsky says
Unfortunately, your can't mix some switches. You should be able to do it in a vba or powershell script.
John says
Hi Diane
I fix it, works like a charm
Bat Script:
start outlook /Profile Fred
timeout 5
start outlook /c ipm.note /m accounts@media.com?subject=New_invoice_to_issue
Rob says
Anyone know how to open the online archive with a command line switch?
Claudio Gomes says
Thanks for this Diane. I was looking for a way to switch profile without having to go into Control Panel > Mail
I have 2 profiles, one for teaching, which I use once every couple weeks and my main one with my day to day mailboxes.
In the late 2000s I recall there was a shortcut <ctrl>-<shift><something> I could press while clicking on outlook that would allow me to select the profile when I launching Outlook. I can't remember that anymore... I'm getting too old....
John says
Cladio do this:
Control Panel
Mail
Show Profiles - Down the bottom activate 'prompt for profile to be used'
cheers
Tom Rothschild says
I have a problem where Outlook stalls while searching the server for messages. I've had this before, solution is to lengthen the time that Outlook allows each of my accounts for searching the server. But I need to start Outlook in a different mode to allow me to modify the account(s) in that way, and I don't seem to have the record of how to do this. Can you help me out? (The email below is Exchange, so not affected by the issue)
Walt says
Diane, I have looked and not having any luck finding the answer to my scenario. I am generating an email from the command line but instead of an attachment how do i add a hyperlink for the path that takes the user to the directory on the network where the files can be accessed?
start "" "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE" /c ipm.note /m "walter.williams@kp.org; Test@kp.org &subject=HEADS UP: %date%- Pends Weekly Dashboard - updated &body=Hello,%%0D%%0A %%0D%%0ADashboard report now updated. %%0D%%0A %%0D%%0AIf you have any questions please let me know, thanks%%0D%%0A %%0D%%0AWalter Williams, BSIT%%0D%%0AData Production and Analysis IV / CCAE / IA Advisor%%0D%%0A[auto-generated email]%%0D%%0A" /a "H:\Final Reports mdbs etc\AD HOC REQUESTS Clarity_and_Tapestry and Scheduled\Automated Productivity Report\Pends_Weekly\MasterFile\PENDS_Weekly_Dashboard.xlsb"
Pete Wilson says
This article is outdated - /cleanfreebusy is not included in Outlook 365.
Diane Poremsky says
That's because this list is for 2010/2007.
2013 and newer are here- Command Line Switches for Outlook (slipstick.com) (I really need to merge all into one article)
Diane Poremsky says
The threads are merged now into one with the command lines for 2007 and newer.
maire says
Hello
Is there any switch to launch a VBA macro which would be in the VbaProject.Otm
Diane Poremsky says
No, but you can have macros run when outlook opens or when a reminder fires.
Paul Hawkins says
"outlook /select outlook:calendar" does not work for me in my logon startup script for Outlook 365 anymore. Instead, it just starts Outlook 365 in it's default folder, the Inbox. I know I can tell Outlook to open with my Calendar, but if I did that and then opened another Outlook instance for my Inbox, my WindowManager would see another Calendar instance and lock it on top of my existing Calendar instance. It used to work, but I've been foiled by yet another wonderful Office 365 Update !
Disclaimer: I'm a Linux/OSX aficionado and I loathe Microsoft, but my employer won't give me the option to use a Superior OS, so I'm stuck with B.S. like this.
Jerry Mander says
I am creating a batch file to simplify the startup of 8 programs which we start on windows 10. Most work with; start "path/program". However, when we try this for the outlook email client, office 16 (part of 365 pro) just launches another terminal window when I try to open the outlook client this way. Is the outlook client smart enough to be launched from a batch file or do we need to find a better client?
Here is the exact line I am trying to use.
start "C:\Program Files\Microsoft Office\Office16\OUTLOOK.EXE"
Any ideas?
Kyle Schroedre says
What about the /pim switch, i.e. "outlook.exe /pim DummyProfile"? This is used to create a "dummy" profile (i.e. no mail account attached) so you can run AutoDiscover diagnostics. I noticed this is also not listed in the MS KB article about these switches, but appears elsewhere. Not sure if it is is 2016/365 specific, but I get an error if I try it on Outlook 2013 (MSI).
Diane Poremsky says
That is for 2016 and newer builds - they removed the ability to create a new mail profile and added the switch to replace it.
https://www.slipstick.com/outlook/create-no-mail-account-outlook-2016/
Toff says
Hi,
With regards to /select foldername
Do you know if it's possible to specify a dynamic folder, such as one under "Search Folders"?
Thanks in advance
Toff
Diane Poremsky says
Yes, use this format: /select "outlook:\\alias@domain.com\search folders\unread mail"
That command is for a folder in a secondary data file - try this for the default data file /select "outlook:\\search folders\unread mail"
https://www.slipstick.com/outlook/choose-outlook-startup-folder/
Jonny Lerner says
Hi Diane, thanks for this!
Would you know why might Outlook365 open a .msg file with a simple HTML body, an unsent flag, recipients, and subject line without actually showing the contents of the body? That is, the composer window opens up, with the recipients and subject written in their appropriate places, but the message body appears blank. However, when I manually drag the file over to the Outbox folder it looks correct.
Also, is there a way to maybe add such a msg file to the outbox directly via a command line?
DanC says
Great info here Diane - Thanks. Is it possible to combine switches? I'm trying to use /a and /c to create an email with an attachment and pre-fill the email address and i'd also like to prefill the subject line with the name of the attachment. Is this possible? Or do you have any other suggestions on how to accomplish this? Thanks Dan
Diane Poremsky says
you can combine some switches, but everything you want isn't possible. If you can use a script instead of command lines, Joe's script at https://www.slipstick.com/outlook/create-a-custom-send-to-shortcut/#joseph can do it all.
satya says
Is there any way to open 5 new messages using this type of command in outlook 2017
Diane Poremsky says
No, not within a command line. If it's 5 new messages, you could use a batch file. If you need to open 5 existing messages, it would only work if it was always the same 5.
Nasser says
Hi Diane,
I want to consult you for this problem in Outlook 2013 :
When my user searches for a "sender" on her inbox: the result displays emails from most recent to oldest (chronological), but when she classifies them by "From" to display the name of this sender: it only sees the mails of August and April, because those of May, June and July are displayed at the bottom: the months are not displayed in chronological order
This anomaly also manifests itself with the search for other shippers.
I don't find any solution on Internet for this problem
Thank you very much
Pierre de Grenoble says
Hello Diane,
/select does not seem to work when the related PST file is protected by a password (prompted to be typed on Outlook startup). An error message is displayed saying that Outlook could not be started as the folder could not be displayed.
Are you aware of such behavior/restriction?
I tried to use this command-line argument as I can not set up the startup folder in Options / Advanced / Outlook start and exit. It only works if the selected folder belongs to the default PST file. If the selected folder belongs to another folder, the setting is not remembered and reverts to the Inbox folder of the default PST file. Quite strange and I suspect my profile to be corrupted.
Diane Poremsky says
What version of outlook are you using? I'm not aware of that behavior, but will test it.
TechnetUser says
The registry location specified for the EnableAltvba setting is wrong. The correct location is HKCU\Software\Microsoft\Office\14.0\Outlook\Security.
Diane Poremsky says
Both keys are valid - the policies key is used (mostly) with GPO's but also works for anyone.
Anand says
Hi Diane,
I have a little question to consult you :-)
It's about the deployment of a password-protected "VbaProject.OTM" to Outlook 2010 or above version.
Actually, In the past time when I used Outlook 2007, I just need to copy the "VbaProject.OTM" to the path "%AppData%MicrosoftOutlookVbaProject.OTM". If the macro is enabled in Outlook Options, when I restart Outlook, the macro will be loaded automatically.
But recently after I upgraded Outlook to version 2010, I found that if I just copy the OTM file to that path, the macro will never be loaded automatically, unless I open the VBA project once with correct password then restart Outlook. But you know it is not a good solution to deploy the macro for tens of desktops.
So I want to know if there is any better way to solve the problem, or maybe I could do something else to make the deployment easier.
Thank you very much :-)
Diane Poremsky says
the easiest way to deploy to compile into a com addin and install it. For security reasons, macros won't run if the editor isn't initialized.
Not putting it in the default location might work - but that needs opened with a command line, which is just as hard to deploy.
https://www.slipstick.com/developer/start-outlook-vba-project-file/
Empress says
Thank you for all of this. I've set up a shortcut to /select outlook:tasks and put it on my Windows toolbar, but it always launches Outlook -- so I end up with 10 sessions running. Is there any way to make it conditional, like: "launch Outlook if it's not already open"?
Diane Poremsky says
That would be the /recycle switch
outlook.exe /select outlook:tasks /recycle
should work (does here, in the run command)
Jon says
Hi After upgrading to Office 2016 some of our users no longer receive the outlook calendar popup reminders...
We've tried the switch outlook.exe /cleanreminders to clear it but still no popups and I also created second outlook profile acct and no popups.
Any suggestions how to resolve this we've been trying for sometime now and have not been able to fix it for them.
Thank you
Diane Poremsky says
Are reminders enabled? Tools, options, advanced - near the top is 'show reminders'. If you are using group policy, verify reminders are not turned off there.
chris says
How do I start outlook and turn off the check for email?
Its taking forever checking email and by the time it is finished, it is scheduled to check again.
Diane Poremsky says
How frequently is it set to check for mail? We recommend no less than 5 minutes, with 8 minutes recommended.
bir garib says
thank you .How can I do this change .I tried but not working.
"use VBA and set the status as a meeting.
Set objAppt = Application.CreateItem(olAppointmentItem)
objAppt.MeetingStatus = olMeeting"
Diane Poremsky says
you need to set the meeting status in the code that creates an appointment, such as the code at the end of this page -
https://www.slipstick.com/developer/create-a-new-message-using-vba/
bir garib says
I want use Outlook /c ipm.schedule.meeting.request but not working .Does not like appear in outlook new meeting request
Diane Poremsky says
Correct, because its the incoming meeting request form. You'll need to use IPM.Appointment and click the Invite button or use VBA and set the status as a meeting.
Set objAppt = Application.CreateItem(olAppointmentItem)
objAppt.MeetingStatus = olMeeting
richardquintana says
Hello!
Is there a way to add more than one file as attachment? I tried using /a switch with semicolon, but without success (/a "c:\test1.txt;c:\test2.txt").
I've tried even the zerprize tip (/m email@address.com&attachment=c:\Folder\file.txt) without success either.
Thank you!
Best regards,
Diane Poremsky says
I haven't found a way. Will it always be the same attachments? If so, you can use VBA.
I have a VBA script that will work with attachments in the file systems and works outside of outlook.
See https://www.slipstick.com/outlook/create-a-custom-send-to-shortcut/ for the VB Script.
zerprize says
As Diane states I understand you can only ever have one attachment with the command line switch.
Another workaround is to place all of the attachments into a zipped folder and then just attach the zip folder as a single attachment.
Paula says
Hi, I've been looking for info on how to stop multiple meetings being sent out to several people, from Outlook 2010. Recipients are receiving 1 email a minute, same info.
Thank you!
Diane Poremsky says
Is the meeting being accepted on an smartphone? That has been known to trigger this problem.
zerprize says
Just discovered more features of /m switch.
You can populate other fields such as CC:, subject, body etc. Just add them after the email address the same as you would with a 'mailto:' command, for example:
/m email@address.com&subject=subject&cc=copy@address.com&body=Hello
If you have spaces, enclose it in quotes:
/m "email@address.com&subject=subject text&cc=copy@address.com&body=Hello there!"
/m can be used after either the /c switch or the /a switch. You do not need to use /c with /a, as it creates a ipm.note by default.
Cheers
Questorfla says
I am sure this can be done because a few years back I had a complete script that ran perfectly. I just don't see the final "click" to make it send. Everything else works beautifully.
Diane Poremsky says
you can't autosend a message using the command line switches. You need to use a macro.
Adrian says
If you want to add multiple emails in the "to" field and multiple addresses in the "cc" field, how do you format that?
Diane Poremsky says
multiple address can be separated with semi-colon ; but you can't control to/cc using switches.
/m someone@slipstick.com;mary@slipstick.com
using mailto:, you can do more:
mailto:me@slipstick.com?cc=you@slipstick.com&bcc=them@domain.com&subject=Testing%20this&body=Hello%20how%20are%20you
Ariel Reyes says
Hi!
How can I use the "/a {filepath}" to attach multiple files? this switch seems to only work to attach one file per email message created...
Diane Poremsky says
Correct, that only works with one file. Use Joe's script at https://www.slipstick.com/outlook/create-a-custom-send-to-shortcut/ (at end of article) to insert multiple attachments.
James says
Hi Diane,
I have a SharePoint List that can't be removed from Outlook 2013. After deleting it, it just comes back when Outlook is restarted.
I was excited to discover the command line switches cleansubscriptions and cleansharing. They seem to be meant for my exact situation. But they do nothing. The list still comes back.
The commonly suggested solution (Check the box that says "Don't display this list on other computers I use") is useless because that check box does not exist. Also, I know the problem is local to this machine because it still happens when I disconnect it from the network.
Do you have any other suggestions?
Diane Poremsky says
Is this the last/only sharepoint list? If so, delete the sharepoint data file in %localappdata%\microsoft\outlook. If that doesn't work, you might need MFCMAPI to examine your mailbox and delete whatever hidden file is hanging around.
James says
Thanks for your help Diane. It was the last Sharepoint list but deleting the data file had no effect. It just came back. Tried MFCMAPI for the first time ever. Dug through data folders for quite a while but never found anything identifiable. Seemed like I was just looking at an exe in a hex editor. I put it off for as long as possible with hope of finding a specific solution, but in the end I just created a new profile and that finally killed the cursed Sharepoint list.
szol says
Hi
to add: I am using Office 365 with the outlook.
Regards
szol says
Hi
I have several group mailboxes and I would like to open each one in a new instance of outlook. So basically the same as mentioned above with the command /profile xy. But then the other one should be f.ex. /profile zz. When I type the two commands correctly using the correct profile name, then the first profile will be loaded twice but not the two different ones. So the second profile to open will not open. How can I get this different profile opened simultaneously with the first profile?
Thx and regards
pnwood says
Thanks Diane! Just added a bunch of command s to my Launchy config. Moving away from the mouse everyday.. Thanks..
Benjamin Wojcik says
Thank you for pointing me in the right direction. After modifying the tracking settings in my Outlook client, the 'sniff ' switch seems to be working.
Benjamin Wojcik says
Dear Ms. Poremsky:
When I open Outlook 2013 with the 'sniff' switch, it does not accept meeting requests in my inbox. ("C:\Program Files\Microsoft Office 15\root\office15\OUTLOOK.EXE" /sniff) I know what Outlook 2013 does not have autobooking. Is it the case that the 'sniff' switch actually remains a valid switch or was it removed with autobooking?
Diane Poremsky says
it's supposed to work in Outlook 2013. It should add the events you your calendar as tentative or accepted in configured in Calendar Options.
The admin can disable the ability to create tentative appt.
https://www.slipstick.com/outlook/calendar/disable-ability-create-tentative-appointments/
Frederick Ollewagen says
Hi Diane, thank you for your article
I have issues with an Outlook 2007 account, that will not remember passwords
Problem started after the PC was shut down for bad weather, since the restart it will not remember email account passwords
I have uninstalled the Office Package and reinstalled
I have deleted all the accounts, renamed the pst and open a new profile
Using the switches above, i have run /safe, /cleanprofile, /cleanrules, /cleansharing/ cleanpst (did not run)
I have setup the accounts on a laptop and it works fine there?
I am a bit wary to run switches that might create more issues :(
Can you give me any advice?
Diane Poremsky says
its probably the registry where the password is stored. Which version of windows? In older versions you delete the protected storage key. You'll lose all saved passwords though. :(
What type of email account? You could try a new profile and see if it works (don't delete the old one) and if it doesn't, switch back to the new old and delete the protected storage key. See https://www.slipstick.com/problems/the-never-ending-network-password-dialog/#profile.
zermenoj says
No, you simply can't see which attendees have accepted when she opens the re occuring meeting.....thanks by the way...can't wait to see your reply.
Juan Zermeno says
i have a user that is working on MS Outlook 2010. She created a re-occurring meeting for one of the meeting rooms calendars. After she created the meeting, sent out the invites. She goes back to open that meeting and she's not able to view the list of attendees. Your help is much appreciated.
Diane Poremsky says
Does she get any error messages?
cyberintruder says
could you please tell me how to specify "From" address . because i have added to two accounts in the outlook . by default it is select from first mail only . i want to send from second mail account .
Diane Poremsky says
What version of Outlook do you use? You can't set an account to use from a command line, but you can select it in message form. If you use 2010 or 2013, the account whose folders you are viewing is set as the sending account automatically.
jerrod says
i had a request from someone that they wanted to open 3 different windows when they started outlook. So i created an "outlook.cmd that will run the switches and it functions, but the user would like to have 2 different inboxes open (and calendar), since they have access to multiple email accounts in their profile. How can you set a /select outlook:inbox for the additional inboxes to open?
Here is the cmd so far:
@start "" "%ProgramFiles(x86)%\Microsoft Office\Office15\outlook.exe" /select outlook:Inbox
@start "" "%ProgramFiles(x86)%\Microsoft Office\Office15\outlook.exe" /select outlook:Calendar
Diane Poremsky says
You need to use the mailbox name Outlook:"Mailbox - Mary Conrad/Sent Items" - I think that is the correct format (with quotes)
(from using-outlook-links
Aaron says
Hi, thanks for this great guide! I've been looking for something like this for a while. One thing I don't see is a command to enter an address in the "from" field. Is there any way to do that, as far as you know? I'm trying to create a shortcut to send messages from a group mailbox. I can create a new message, and enter the group mailbox address in the "from" field manually, but I can't see any way to automate the process.
Thanks!
Diane Poremsky says
There isn't a switch or keyboard shortcut, but you could use a VBA macro or a custom form - only drawback with either is you'd open the form or run the macro when you wanted to send mail from that address instead of clicking the New button. Either can be assigned to a button in the ribbon or quick access toolbar - you just need to remember to use that button, not New Mail.
The macro is probably going to be the easiest - I should have some code here that does it. Let me look...
Diane Poremsky says
This is the code you need -
Public Sub CreateNewMessage()
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.SentOnBehalfOfName = "alias@domain.com"
.Display
End With
Set objMsg = Nothing
End Sub
cyberintruder says
thank you , really this is helpful to me . but in the body tag how to use new lines in that could you say
Diane Poremsky says
You mean you want to add blank lines to a Notes or Message body? You'd use the VB code for blank lines - vbCrLF.
Mark Szot says
Hi Diane.
Is there a command line switch to open an additional mailbox in outlook 2010. Trying to create a file that will open outlook for an administrative assistant inbox and her boss in box which is an additional mailbox within her outlook 2010 profile. Thx
Diane Poremsky says
No, there is not. What version of Exchange? If you give her fullaccess permission to the boss's mailbox, it will open automatically as part of her profile.
powershell cmdlet for this is:
Add-MailboxPermission "boss" -User assistant -AccessRights FullAccess
Steve Arey says
Diane, you are awesome! Thanks for all that information, it was clearly over my head.
Can you give me a tool to find a person's e-mail address from their home address or name?
Diane Poremsky says
Are you wanting to use instant search to find the contact in outlook or do you mean searching online for an email address?