Applies ToExcel for Microsoft 365 Word for Microsoft 365 Outlook for Microsoft 365 PowerPoint for Microsoft 365 Access for Microsoft 365 Excel 2024 Word 2024 Outlook 2024 PowerPoint 2024 Access 2024 Excel 2021 Word 2021 Outlook 2021 PowerPoint 2021 Access 2021 Excel 2019 Word 2019 Outlook 2019 PowerPoint 2019 Access 2019 Excel 2016 Word 2016 Outlook 2016 PowerPoint 2016 Access 2016 Outlook 2013
You’re invited to try Microsoft 365 for free

When you launch a Microsoft Office product, the startup process runs in a standard way. Microsoft Word, for example, displays the Word splash screen and loads the Normal template. But suppose you want Word to start without its splash screen and then load a template other than the Normal template. Or, you want to customize the process even more by loading an add-in or running a macro upon startup. You can add options like this by using subcommands called command-line switches to an Office app's startup command.

If you want to use the customization just one time, you can type the command and switch in the Run dialog box (Start menu) in Microsoft Windows. If you want to use a particular switch many times or every time that you start the app, you can create a desktop shortcut that starts the program by using the same switch and parameters. This article describes how to do both. It also includes a table that lists all of the switches and parameters that are available in the desktop Office apps.

Using a command-line switch doesn't mean you have to type the whole startup command at the command prompt. You can start the Office app as usual, by clicking the program icon on the desktop, or by clicking the program name on the Start menu. All startup methods essentially do the same thing: they run the app's .exe file, even if you don't actually type the command or even see it.

A command-line switch is a modifier that is added to the .exe file. A startup file with a switch looks like this.

 outlook.exe /nopreview

In this example, a command-line switch has been added to the .exe file for Microsoft Outlook. The switch consists of a forward slash and a word or abbreviation that indicates the switch's action. This switch tells Outlook to launch without showing the Reading Pane.

A switch is sometimes followed by one or more specific instructions called parameters, which give the program further information about how to run the .exe command. For example, the following command tells Outlook to load a specific profile name upon startup.

outlook exe /profile profilename

Switch names cannot be abbreviated and are not case-sensitive. However, their parameters are sometimes case-sensitive.

Here are the names of the startup commands for the Office products Word, Excel, PowerPoint, PowerPoint viewer, Outlook, and Access.

Word

winword.exe

Excel

excel.exe

PowerPoint

powerpnt.exe

PowerPoint Viewer

pptview.exe

Outlook

outlook.exe

Access

msaccess.exe

When you use one of the Office startup commands, you must supply the full path to the product's .exe file. Verify the location of this file on your computer. This table shows the locations of the .exe files if you accepted the default folder locations during installation.

In Office 2016  & Office 2019

Windows 32-bit: C:\Program Files (x86)\Microsoft Office\Office16\

Windows 64-bit: C:\Program Files\Microsoft Office\Office16\

In Office 365

Windows 32-bit: C:\Program Files (x86)\Microsoft Office\root\Office16\

Windows 64-bit: C:\Program Files\Microsoft Office\root\Office16\

  1. In Windows 10, click the Search or Cortana icon in the taskbar, type Run, and then click Command Prompt in the results.

  2. In the Run dialog box, type a quotation mark, enter the full path for the app's .exe file, and then type another quotation mark. Alternatively, click Browse to locate and select the file. In this case, the quotation marks are supplied automatically.

  3. After the closing quotation mark, type a space, and then type the switch. For example, you might type:

    "c:\program files\microsoft office\office15\outlook.exe" /nopreview
    

The next time you start the app, it opens as usual. To make your customized startup available for repeated uses, see the next section.

Note the following about using command-line switches:

  • You can use only one switch at a time. Starting an Office app with multiple switches is not supported.

  • If the parameter is a path to a location on your computer, or a file name with spaces in it, enclose it in double quotation marks—for example, /t "Monthly Report.dotx".

  • Switches and parameters are not case-sensitive. For example, /RO functions the same as /ro.

  • Include one blank space before each switch and one before each parameter.

  1. Right-click the Windows desktop, point to New, and then click Shortcut on the shortcut menu.

  2. In the Create Shortcut Wizard, in the Type the location of the item box, type a double quotation mark ("), enter the full path for the app's .exe file (including the file name), and then type another double quotation mark. (Alternatively, click Browse to locate and select the file. In this case, the quotation marks are added automatically.)

  3. Following the closing quotation mark, type a space, and then type the switch and any parameters. If the parameter is a path to a location on your computer, and the path contains a space, it also must be enclosed in quotation marks. For example:

    "c:\program files\microsoft office\office15\excel.exe" /r "c:\My Folder\book1.xlsx"
    
  4. Click Next.

  5. In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.

    The wizard creates the shortcut and places it on the desktop.

Whenever you want to use the shortcut to start the app, double-click it.

To add the desktop shortcut to the Windows Start menu, right-click the shortcut, and then click Pin to Start menu on the shortcut menu.

List of command-line switches for Office products

Each Office product has a different set of command-line switches.

Switch and parameter

Description

/safe

Starts Word in Safe Mode.

/q

Starts Word without displaying the Word splash screen.

/ttemplatename

Starts Word with a new document based on a template other than the Normal template.

Example    To start Word with a document based on a template called Myfax.dotx, stored on the C drive, type the following at the command prompt:

/tc:\Myfax.dotx

Note: Do not include a space between the switch and the name of the template file.

Security Note: Because templates can store macro viruses, be careful about opening them or creating files based on new templates. Take the following precautions: run up-to-date antivirus software on your computer, set your macro security level to high, clear the Trust all installed add-ins and templates check box, use digital signatures, and maintain a list of trusted sources.

/t filename

Starts Word and opens an existing file.

Example    To start Word and open the template file Myfax.dotx, stored on the C drive, type the following at the command prompt:

/t c:\Myfax.dotx

Example    To start Word and open multiple files, such as MyFile.docx and MyFile2.docx, each stored on the C drive, type the following at the command prompt:

/t c:\MyFile.docx c:\MyFile2.docx

/f filename

Starts Word with a new document based on an existing file.

Example    To start Word and create a new document based on file MyFile.docx, stored on the desktop, type the following at the command prompt:

/f "c:\Documents and Settings\All Users\Desktop\MyFile.docx"

/h http://filename

Starts Word and opens a read-only copy of a document that is stored on a Microsoft Windows SharePoint Services site. The site must be on a computer that is running Word 2007 or later or Windows SharePoint Services 2.0 or later.

Example    To start Word and open a copy of file MyFile.docx, stored in a document library at the URL http://MySite/Documents, type the following at the command prompt:

/h http://MySite/Documents/MyFile.docx

Note: If the document is checked out to you, the /h switch has no effect. Word opens the file so that you can edit it.

/pxslt

Starts Word and opens an existing XML document based on the specified Extensible Stylesheet Language Transformation (XSLT).

Example    To start Word and apply the XSLT MyTransform, stored on the C drive, to the XML file Data.xml, also stored on the C drive, type the following at the command prompt:

/pc:\MyTransform.xsl c:\Data.xml

/a

Starts Word and prevents add-ins and global templates (including the Normal template) from being loaded automatically. The /a switch also locks the setting files.

/ladd-in

Starts Word and then loads a specific Word add-in.

Example    To start Word and then load the add-in Sales.dll, stored on the C drive, type the following at the command prompt:

/lc:\Sales.dll

Note: Do not include a space between the switch and the add-in name.

Security Note: Use caution when running executable files or code in macros or applications. Executable files or code can be used to carry out actions that might compromise the security of your computer and data.

/m

Starts Word without running any AutoExec macros.

/mmacroname

Starts Word and then runs a specific macro. The /m switch also prevents Word from running any AutoExec macros.

Example    To start Word and then run the macro Salelead, type the following at the command prompt:

/mSalelead

Note: Do not include a space between the switch and the macro name.

Because macros can contain viruses, be careful about running them. Take the following precautions: run up-to-date antivirus software on your computer; set your macro security level to high; clear the Trust all installed add-ins and templates check box; use digital signatures; maintain a list of trusted publishers.

/n

Starts a new instance of Word with no document open. Documents opened in each instance of Word will not appear as choices in the Switch Windows list of other instances.

/w

Starts a new instance of Word with a blank document. Documents opened in each instance of Word will not appear as choices in the Switch Windows list of the other instances.

/r

Re-registers Word in the Windows registry. This switch starts Word, runs Office Setup, updates the Windows registry, and then closes.

/x

Starts Word from the operating system shell so that Word responds to only one Dynamic Data Exchange (DDE) request (for example, to print a document programmatically).

/ztemplatename

Visibly behaves exactly like the /t switch. However, you can use the /z switch with Word to generate both a Startup and a New event, whereas the /t switch generates only a Startup event.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

You’re invited to try Microsoft 365 for free