How (and Why) to Start Microsoft Word from the Command Prompt

word logo

Like most applications, you can launch Word from the command prompt, but Word also supports multiple optional switches to control the startup process.

If you type the command at the prompt, use it for to create a shortcut, insert it in the frame of a batch scriptStarting Word with additional settings allows you, for example, to start Word in safe mode for troubleshooting or to start with a specific template.

Using the Command Prompt to Start Word

Before you can open Word using the command prompt, we must determine the directory where the winword.exe file is located. You can do it manually or simply ask the command prompt to find it. To do this, open the command prompt by opening the Start menu, typing "cmd" and selecting the "Command Prompt" application.

Open a command prompt in the Start menu

When you open the command prompt, you are in the top-level directory, the folder of your user account. We need to go further by going to the Program Files directory. Do it by entering the following command and pressing Enter:

cd "program files (x86)"

Program files in the command prompt

You will now be in the Program Files directory. The next step is to locate the directory where the winword.exe file is located. Do it by typing the following command and pressing "Enter."

dir winword.exe / s

Once you have entered this command, the command prompt will locate the directory for you.

Winword Directory

Now that you know the directory where the winword.exe file is located, you can use the cd command to open the file path. In this example, you must enter the following command:

Microsoft Office root Office16 cd

You should now be in the directory where winword.exe is located.

Open the Winword file

Now, if you want to open Microsoft Word in the same way as if you open it via its icon, just type winword, then press "Enter." Word will open normally.

Open normal word

However, the advantage of this command is that you can use the various switches and parameters it offers.

Common Word Switches and Command Line Parameters

Borrowed from official Microsoft Office support websiteHere is a list of different ways to open Word, as well as the corresponding command.

Switch and parameter
The description

/sure
departures Word in Safe Mode. This launches Word without other add-ins, templates, and other customizations. This is useful when solving problems in Word.

You can also start Word in safe mode by holding down the Ctrl key while launching Word from the Start menu. Creating a shortcut with this setting greatly facilitates this process.

/ q
Start Word without displaying the Splash Word screen.

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

Example: Suppose we want to open a document stored on drive C called example.docx, we type the following command:

/tc:example.docx

Note: Do not put space between the switch and the file name.

/ t filename
Start Word and open an existing file.

Example: To start Word and open the existing file example.docx, stored on drive C, enter the following information:

/ t c: example.docx

To open multiple files, example.docx and example2.docx, located in drive C at the same time, enter the following information:

/ t c: example.docx c: example2.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 the example.docx file, stored on the desktop, enter the following:

/ f "c: Documents and Settings All Users Office example.docx

/ h http: // filename
Starts Word and opens a read-only copy of a document 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 a sample.docx file, stored in a document library at the http: // MySite / Documents URL, enter the following:

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

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

/ pxslt
Starts Word and opens an existing XML document based on the specified XSLT.

Example: To start and apply XSLT MyTransform, stored on drive C, enter the following information:

/pc:MyTransform.xsl c: Data.sml

/a
Starts Word and prevents automatic loading of add-ins and global templates (including the Normal template). The / switch also locks the parameter files.

/ ladd-in
Start Word, and then load a specific Word add-in.

Example: To start Word and load the Sales.dll Add-in, stored on drive C, enter the following:

/ic:Sales.dll

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

/ m
Starts Word without running AutoExec macros.

/ mmacroname
Start Word and run a specific macro. The m / switch also prevents Word from running AutoExec macros.

Example: To start Word, and then run the Salelead macro, enter the following:

/ mSalelead

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

/ not
Starts a new instance of Word without an open document. The documents opened in each instance of Word do not appear as an option in the Switch Windows list of other instances.

/ w
Starts a new instance of Word with a blank document. The documents opened in each instance of Word do not appear as an option in the Switch Windows list of other instances.

/ r
Re-register Word in the Windows registry. This switch starts Word, runs the Office Setup program, updates the Windows registry, and closes the program.

/ X
Starts Word from the operating system shell so that Word only responds to one 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 event and a New event, while the / t switch only generates a Startup event.

That's all we can say! You should now be able to open Word in the way you choose by simply following these commands.

RELATED: How to run command prompt commands from a Windows shortcut

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.