Blog

Starting Microsoft Word from the Command Prompt (and Why)

Word 2021 - GGKEYS

You can launch Microsoft Word from the Command Prompt and use various switches to control how it starts. This is useful for troubleshooting, automating tasks, or starting Word with specific configurations.

Opening Word Using the Command Prompt

  1. Find the Location of winword.exe:
    • Open the Command Prompt by typing “cmd” in the Start menu and selecting Command Prompt.
    • Change the directory to the Program Files folder by typing:bashCopy codecd\”program files (x86)” This takes you to the Program Files directory.
    • To locate winword.exe, type:bashCopy codedir winword.exe /s
    • Once located, navigate to the folder containing winword.exe (e.g., Microsoft Office\root\Office16) by typing:bashCopy codecd Microsoft Office\root\Office16
  2. Launch Word:
    • To open Word normally, type:bashCopy codewinword

Common Word Command Line Switches

Here’s a list of switches you can use to launch Word in specific ways:

SwitchDescription
/safeStarts Word in Safe Mode (no add-ins, templates, or customizations). Useful for troubleshooting.
/qStarts Word without displaying the splash screen.
/t template_nameStarts Word with a new document based on a specific template.
/t filenameStarts Word and opens an existing file. Example: /t c:\example.docx
/f filenameStarts Word with a new document based on an existing file.
/h URLOpens a read-only copy of a document stored on a SharePoint server.
/pxsltStarts Word and applies an XSLT to open an XML document.
/aStarts Word and prevents add-ins and global templates from being loaded.
/l add-inStarts Word and loads a specific add-in. Example: /l c:\Sales.dll
/mStarts Word without running any AutoExec macros.
/m macro_nameStarts Word and runs a specific macro. Example: /m Salelead
/nStarts a new instance of Word with no document open.
/wStarts a new instance of Word with a blank document.
/rRe-registers Word in the Windows registry.
/xStarts Word from the operating system shell to respond to a DDE request (e.g., printing).
/z template_nameSimilar to /t, but also triggers both Startup and New events.

Using Command Line Switches in Shortcuts or Scripts

To make using these switches easier, you can create shortcuts or batch scripts with the desired commands. For example, to open Word in Safe Mode via a shortcut, you would create a shortcut with the following target:

bashCopy code"C:\Program Files (x86)\Microsoft Office\root\Office16\winword.exe" /safe

This approach allows for quick access to specific versions of Word, tailored to your needs.

Unlock powerful features with a genuine Office 2021 Professional Plus Key – get the best deal at the lowest price today!

Leave a Reply

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