Starting Microsoft Word from the Command Prompt (and Why)
Launching Microsoft Word from the Command Prompt is not just for opening the app—it also allows you to use various switches and parameters to control Word’s behavior. These are especially useful for troubleshooting or automating tasks.
Finding the Word Executable (winword.exe)
Before you can use the Command Prompt to launch Word, you need to locate its directory.
- Open the Command Prompt by typing
cmd
in the Start menu and pressing Enter. - Use the following command to navigate to the Program Files directory:bashCopy code
cd\"program files (x86)"
- Search for the Word executable file using this command:bashCopy code
dir winword.exe /s
The Command Prompt will display the path towinword.exe
. - Navigate to the directory where
winword.exe
is located using thecd
command. For example:bashCopy codecd Microsoft Office\root\Office16
Now you are ready to run Word commands.
Basic Command to Open Word
To open Word, simply type the following and press Enter:
bashCopy codewinword
Common Command Line Switches and Parameters
Switch/Parameter | Description | Example Command |
---|---|---|
/safe | Starts Word in Safe Mode (no add-ins or customizations). Useful for troubleshooting. | winword /safe |
/q | Opens Word without the splash screen. | winword /q |
/t[templatename] | Opens Word with a document based on a specified template. | winword /tC:\example.docx |
/f[filename] | Opens Word and creates a new document based on an existing file. | winword /f"C:\example.docx" |
/h[http://filename] | Opens a read-only file stored on a SharePoint site. | winword /hhttp://mysite/documents/example.docx |
/a | Prevents add-ins and global templates (like Normal.dotm) from loading. | winword /a |
/m[macroname] | Starts Word and runs a specific macro. | winword /mMyMacro |
/n | Opens a new instance of Word with no document open. | winword /n |
/r | Re-registers Word in the Windows registry. | winword /r |
Examples
Open Word in Safe Mode:bashCopy codewinword /safe
- Start Word with a specific template:bashCopy code
winword /tC:\Templates\MyTemplate.dotx
- Run a macro on startup:bashCopy code
winword /mProcessData
- Open Word without loading add-ins or templates:bashCopy code
winword /a
- Re-register Word in the Windows registry:bashCopy code
winword /r
Creating Shortcuts with Command Line Switches
You can create desktop shortcuts to launch Word with specific parameters:
- Right-click on your desktop and select New > Shortcut.
- Enter the command (e.g.,
winword /safe
) in the location field. - Name your shortcut (e.g., “Word Safe Mode”).
- Click Finish.
Now you can launch Microsoft Word in different ways to suit your needs using the Command Prompt or shortcuts!