logo
search
Office Settings & Configuration

How to Launch a Word Add-in from the Command Line

Maira MehtabMaira Mehtab Oct 20, 2026 869 views

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.

How to Launch a Word Add-in from the Command Line
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the Run dialog or Command Prompt

Press the Windows key + R to open the Run dialog, or type 'cmd' in the Windows search bar to launch the Command Prompt.

2
Enter the exact command

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".

3
Execute the command

Press Enter to run the command. Microsoft Word will launch and automatically load the specified add-in.

Use the Correct /l Command Line Switch
No Spaces Required: Remember that inserting a space after the /l switch (e.g., /l AddInName) will cause Word to misinterpret the command and fail to load the add-in.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install and launch the suite: Run the installer and follow the on-screen instructions. Once installed, launch WPS Writer.
  3. 3. Open your Word documents: Drag and drop your existing .docx files directly into WPS Writer to continue working with full formatting intact.
Fully compatible with Microsoft Word documents (.docx, .doc, .dotm)Lightweight architecture that opens files instantly without complex CLI switchesFamiliar user interface ensuring zero learning curve for Office usersRobust support for standard COM add-ins and developer tools
microsoft office alternative - wps office

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.