How to Launch a Word Add-in from the Command Line
Question details
The user needs to launch a Visual Studio VSTO add-in for Word via the command line but encounters loading issues due to incorrect switch syntax.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Automating or specifically opening Microsoft Word with a pre-installed MSI package VSTO add-in via a command prompt.
- Observed behavior
- The add-in fails to load because the command line switch is incorrectly entered as /ladd-in instead of the proper syntax.
Ensure that your VSTO add-in is properly installed via its MSI package and correctly registered in the Windows Registry before attempting to launch it via the command line.
Use the Correct /l Command Line Switch
Fix the syntax error by using the /l switch immediately followed by the add-in name or path without any spaces.
Many users mistakenly use /ladd-in or /l-add-in as the command line switch. The correct Microsoft Word command-line switch to load an add-in is /l. It must be followed directly by the add-in name or file path without inserting a space.
Press the Windows key + R to open the Run dialog, or type 'cmd' in the Windows search bar to launch the Command Prompt.
Type winword.exe /l followed immediately by the add-in name or path. For example, enter winword.exe /lAddInName or winword.exe /l"C:\Path\To\Addin.dll".
Press Enter to run the command. Microsoft Word will launch and automatically load the specified add-in.

Discover WPS Office for Seamless Document Management
If you are dealing with complex Microsoft Word configurations and add-in errors, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for document creation and editing without the heavy overhead.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install and launch the suite: Run the installer and follow the on-screen instructions. Once installed, launch WPS Writer.
- 3. Open your Word documents: Drag and drop your existing .docx files directly into WPS Writer to continue working with full formatting intact.

Frequently Asked Questions
Why doesn't the /l switch work for my VSTO add-in?
If the /l switch fails, the add-in might not be registered correctly in the Windows Registry, the path provided in the command line may contain errors, or you might be missing quotation marks around file paths that contain spaces.
Can I load multiple add-ins from the command line?
Yes, you can load multiple add-ins by specifying the /l switch multiple times in the same command string, such as `winword.exe /lAddInOne /lAddInTwo`.
Does the /l switch work for Excel or PowerPoint?
Command-line switches vary by application. While /l is used in Word, Excel typically opens add-ins directly by passing the .xll or .xlam file path as a standard parameter rather than using an /l switch.




