Command-line switches for Publisher

To modify how Microsoft_Publisher starts, you can add switches and parameters to the startup command. For example, you can start Publisher with a blank publication, an existing publication, or a specific template.

If you want to use a switch and any associated parameters only once, you can add switches to the Microsoft Windows Run command (Start menu). If you plan to use a customized startup method frequently, you can create a shortcut on the Windows desktop.

A table lists the most common switches and parameters available in Publisher.

In this article

Introducing commands, switches, and parameters

Use a switch once by adding it to the Run command

Make a switch available for reuse by creating a shortcut

Available switches and parameters

Introducing commands, switches, and parameters

Each time you start Publisher, you are actually running the MSPUB.exe command, although you do not usually type the command or even see it. You can change certain aspects of how Publisher starts by adding subcommands called switches to the MSPUB.exe command.

A switch prompts the application to do something like open a file, or it makes the application operate in a specific mode. A switch appears after the main command, following a space and a forward slash (/). Sometimes the switch is followed by another space and then one or more specific instructions called parameters. Parameters give the program additional information about how to execute the MSPUB.exe command.

For example, the following command instructs Publisher to start and immediately open the template named Contoso Business Card.pub.

MSPUB.exe /o "Contoso Business Card.pub"

Top of Page

Use a switch once by adding it to the Run command

First, you must verify the location of the MSPUB.exe file on your computer. If you accepted the default folder locations when you installed Publisher, the MSPUB.exe file can be found in Program Files\Microsoft Office.

The complete default file location can vary based on several factors including whether you have a:

  • 32-bit or 64-bit version of Publisher.

  • 32-bit or 64-bit version of Windows.

  • Subscription version of Publisher.

If you are unsure where you installed Publisher, you can try looking in the Program Files or Program Files (x86) main folders. If you’re using a subscription version of Publisher, the MSPUB.exe file is usually installed in the root subfolder followed by the version number subfolder.

Here are examples of where you might find Publisher, but the path will vary according to your specific installation and setup:

  • Publisher 2016    C:\Program Files (x86)\Microsoft Office\root\Office16\MSPUB.exe

  • Publisher 2013    C:\Program Files (x86)\Microsoft Office\root\Office15\MSPUB.exe

  • Publisher 2010    C:\Program Files\Microsoft Office\Office14\MSPUB.exe

  • Publisher 2007    C:\Program Files\Microsoft Office\Office12\MSPUB.exe

  1. Do one of the following:

    • Windows 8 or 10    Click the Start button, type Run in the Windows search box, and then click Run under Best Match.

    • Windows Vista    Click the Start button , point to All Programs, click Accessories, and then click Run.

    • Microsoft Windows XP or Microsoft Windows Server 2003    Click the Start button, and then click Run.

  2. In the Run dialog box, type the full path for the MSPUB.exe file (including the file name), or click Browse to locate it.

  3. At the end of the path, type a space, and then type the switch and any parameters. For example, you can type:"c:\program files\microsoft office\office12\mspub.exe" /o "Contoso Business Card.pub"

The next time that you start Publisher, the program returns to its previous defaults. To make your customized startup available for repeated uses, see the next section.

Notes: 

  • Switches and parameters are not case-sensitive. For example, /A is the same as /a.

  • Remember to include one blank space before the switch and one before each parameter.

  • If the path or the file name has spaces in it, enclose the complete name in quotation marks — for example, "Contoso Business Card.pub".

Top of Page

Make a switch available for reuse by creating a shortcut

First, you must verify the location of the MSPUB.exe file on your computer. If you accepted the default folder locations when you installed Publisher, the MSPUB.exe file can be found in Program Files\Microsoft Office.

The complete default file location can vary based on several factors including whether you have a:

  • 32-bit or 64-bit version of Publisher.

  • 32-bit or 64-bit version of Windows.

  • Subscription version of Publisher.

If you are unsure where you installed Publisher, you can try looking in the Program Files or Program Files (x86) main folders. If you’re using a subscription version of Publisher, the MSPUB.exe file is usually installed in the root subfolder followed by the version number subfolder.

Here are examples of where you might find Publisher, but the path will vary according to your specific installation and setup:

  • Publisher 2016    C:\Program Files (x86)\Microsoft Office\root\Office16\MSPUB.exe

  • Publisher 2013    C:\Program Files (x86)\Microsoft Office\root\Office15\MSPUB.exe

  • Publisher 2010    C:\Program Files\Microsoft Office\Office14\MSPUB.exe

  • Publisher 2007    C:\Program Files\Microsoft Office\Office12\MSPUB.exe

  1. Right-click the Windows desktop, point to New, and then click Shortcut on the shortcut menu.

  2. In the Type the location of the item box, type the full path for the MSPUB.exe file (including the file name), or click Browse to locate it.

  3. At the end of the path, type a space, and then type the switch and any parameters. For example, you can type: "c:\program files\microsoft office\office12\mspub.exe" /o c:\MyPublication.pub

  4. Click Next.

  5. In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.

    The shortcut appears on the desktop.

  6. Whenever you want to start Publisher in this particular customized way, double-click the shortcut.

  7. To add the desktop shortcut to the Start menu in Windows, right-click the shortcut, and then click Pin to Start on the shortcut menu.

You can create a variety of shortcuts, each of which applies different switches and parameters to the program at startup.

Notes: 

  • Switches and parameters are not case-sensitive. For example, /A is the same as /a.

  • Remember to include one blank space before the switch and one before each parameter.

  • If the path or the file name has spaces in it, enclose the complete name in quotation marks — for example, "Contoso Business Card.pub".

Top of Page

Available switches and parameters

Switches and parameters

Description

/safe

Starts Publisher in safe-mode.

Example    To start Publisher in Safe Mode after it has failed to start normally, type the following at the command prompt:

/safe

/b

Starts Publisher with a blank publication open.

Example    To start Publisher with a blank publication open, type the following at the command prompt:

/b

/t filename

Starts Publisher and opens an existing file as a template.

Example    To start Publisher using a file as a template, type the following at the command prompt:

/t filename

Note: The filename variable can identify the file by the path to the file, by a URL, or by the file path to the Windows Explorer shortcut (*.LNK) to the file or URL. If the file name has spaces in it, enclose the complete name in quotation marks. For example, type /t "Contoso Business Card.pub"

/o filename

Starts Publisher and opens an existing file.

Example    To open a file, type the following at the command prompt:

/o filename

Note: The filename variable can identify the file by the path to the file, by a URL, or by the file path to the Windows Explorer shortcut (*.LNK) to the file or URL. If the file name has spaces in it, enclose the complete name in quotation marks. For example, /t "Contoso Business Card.pub"

/w

Starts Publisher with the catalog of publication types open, even if the Show Publication Types when starting Publisher option is not selected.

Example    To start Publisher with the catalog of publication types open, type the following at the command prompt:

/w

/p filename

Prints the file that you name, and then closes Publisher.

Example    To print a file and then close Office Publisher 2007, type the following at the command prompt:

/p filename

Note:  The filename variable can identify the file by the path to the file, by a URL, or by the file path to the Windows Explorer shortcut (*.LNK) to the file or URL. If the file name has spaces in it, enclose the complete name in quotation marks. For example, /t "Contoso Business Card.pub"

Top of Page

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×