Command-line switches for PowerPoint 2007 and the PowerPoint Viewer 2007

This article shows you how to add switches and parameters to customize the way Microsoft Office PowerPoint 2007 and the Microsoft Office PowerPoint Viewer 2007 start. The command that starts Office PowerPoint 2007 is POWERPNT.exe, and the command that starts the Office PowerPoint Viewer 2007 is PPTVIEW.exe.

What are commands, switches, and parameters?

A switch appears as a space after a main command, followed by a forward slash (/) and the name of the switch, and then one or more specific instructions called parameters, which give the program further information about how to execute the POWERPNT.exe command or PPTVIEW.exe command. Each time that you start Office PowerPoint 2007, for example, you run the POWERPNT.exe command, although you do not usually type the command or even see it. You can change certain aspects of how Office PowerPoint 2007 and the Office PowerPoint Viewer 2007 start by adding subcommands called switches and parameters to the POWERPNT.exe command or PPTVIEW.exe command.

For example, the following command instructs Office PowerPoint 2007 to start and create a new presentation based on a specified template.

1. The command POWERPNT.exe starts PowerPoint.

2. The switch /N starts Office PowerPoint 2007 with a new presentation.

3. The parameter Path\templatename.potx specifies the name of the template that the new presentation is based on — templatename.potx.

Use a switch once by adding it to the Run command

Note: To apply this procedure to Office PowerPoint Viewer 2007, substitute PPTVIEW.exe for POWERPNT.exe in the following steps.

First, verify the location of the POWERPNT.exe file on your computer. If you accepted the default folder locations when you installed Office PowerPoint 2007, the POWERPNT.exe file is located at C:\Program Files\Microsoft Office\Office12\POWERPNT.exe.

If you do not find the POWERPNT.exe file at that location, search for the file and make a note of the full path.

Do one of the following:

Windows Vista

Click Start
, point to All Programs, click Accessories, and then click Run.

Microsoft Windows XP or Microsoft Windows Server 2003

Click Start, and then click Run.

In the Run dialog box, type " (a set of double quotation marks), enter the full path for the POWERPNT.exe file, and then type " again. Or click Browse to locate and select the file and have the quotation marks supplied automatically.

After the closing quotation marks, type a space, and then type the switch and any parameters. For example, you might type:

Create a shortcut to reuse a switch

Note: To apply this procedure to Office PowerPoint Viewer 2007, substitute PPTVIEW.exe for POWERPNT.exe in the following steps.

First, verify the location of the POWERPNT.exe file on your computer. If you accepted the default folder locations when you installed Office PowerPoint 2007, the POWERPNT.exe file is located at C:\Program Files\Microsoft Office\Office12\POWERPNT.exe.

If you do not find the POWERPNT.exe file at that location, search for the file and make a note of the full path.

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

In the Create Shortcut Wizard, in the Type the location of the item box, type "(double quotation marks), enter the full path for the POWERPNT.exe file, and then type " again. Or click Browse to locate and select the file and have the quotation marks supplied automatically.

After the closing quotation marks, type a space, and then type the switch and any parameters. For example, you might type:

Print the presentation to the default printer by using default settings.

When you use the /P switch, PowerPoint displays the Print dialog box before printing. After you choose options and click OK, the dialog box closes, and PowerPoint prints the file and then closes. If you do not want to see PowerPoint at all, use the /PT (Print To) switch instead.

PrinterName is the name of the printer that appears in the Name box under Printer in the Print dialog box. The empty quotation marks are necessary; the quotation marks around PrinterName and the path to the PPTX file are needed only if there are spaces in either of the names, but it is always a good idea to use them.

/PMO

Print the specified file, but show the Print dialog box.

When you use the /P switch, PowerPoint displays the Print dialog box before printing. After you choose options and click OK, the dialog box closes, and PowerPoint prints the file and then closes. If you do not want to see PowerPoint at all, use the /PT (Print To) switch instead.

Restore PowerPoint to the way it was before the program closed abnormally. When PowerPoint restarts, it will attempt to recover and restore some aspects of the state of the program and presentations before it closed.

Note: The playlist file is a list of presentation file names (preceded by the path as needed). It is not possible to add additional command-line switches to the individual presentations within the playlist.

/N#

Open the presentation at a specified slide number, instead of slide 1.