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.

In this article


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.


PowerPoint command line switch /N with template parameter

Callout 1 The command POWERPNT.exe starts PowerPoint.
Callout 2 The switch /N starts Office PowerPoint 2007 with a new presentation.
Callout 3 The parameter Path\templatename.potx specifies the name of the template that the new presentation is based on — templatename.potx.

Top of Page Top of Page

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.

  1. Do one of the following:
    • Windows Vista    
      • Click StartButton image, point to All Programs, click Accessories, and then click Run.
    • Microsoft Windows XP or Microsoft Windows Server 2003    
      • Click Start, and then click Run.
  2. 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.
  3. After the closing quotation marks, type a space, and then type the switch and any parameters. For example, you might type:

"C:\program files\microsoft office\office12\POWERPNT.exe" /N "Path\templatename.potx"

 Notes 

  • Switches and parameters are not case-sensitive. For example, /N functions the same as /n.
  • Remember to include one blank space before the switch and one before each parameter (if any).
  1. If the parameter is a path to a location on your computer, enclose it in double quotation marks (for example, "parameter").

When you restart Office PowerPoint 2007, it starts normally. To make your customized startup available for repeated uses, see the next section.

Top of Page Top of Page

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.

  1. Right-click the Windows desktop, point to New, and then click Shortcut on the shortcut menu.
  2. 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.
  3. After the closing quotation marks, type a space, and then type the switch and any parameters. For example, you might type:

"C:\program files\microsoft office\office12\POWERPNT.exe" /N "Path\templatename.potx"

 Notes 

  • Switches and parameters are not case-sensitive. For example, /N functions the same as /n.
  • Remember to include one blank space before the switch and one before each parameter (if any).
  • If the parameter is a path to a location on your computer, enclose it in double quotation marks (for example, "parameter").
  1. Click Next.
  2. In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.

The wizard creates the shortcut on the desktop.

  1. Whenever you want to start Office PowerPoint 2007 in this particular customized way, double-click the shortcut.

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

You can create a variety of shortcuts, each of which applies different switches and parameters when you start the program.

Top of Page Top of Page

Available switches and parameters for Office PowerPoint 2007

 Notes 

  • You can use only one switch at a time. It is not possible to start PowerPoint with multiple switches.
  • Quotation marks are required if there are spaces in the path or file name. Quotation marks will not do any harm, so it is a good idea to always use them.
Switch or parameter Action
/B

Start PowerPoint with a new blank presentation.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /B

/C

Start PowerPoint with the specified file open and also start Microsoft Windows NetMeeting conferencing.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /C NetMeetingPresentation.pptx

 Note   If you use this switch without specifying a file, PowerPoint starts with no presentation open and NetMeeting conferencing is not started.

/EMBEDDING

Start PowerPoint without displaying the Office PowerPoint 2007 program window. Developers use this switch when testing add-ins.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /EMBEDDING

/M MACRO

Run a macro in a specified presentation.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /M myfile.pptm "MyMacro"

"MyMacro" is a macro in the file myfile.pptm.

/N

Start PowerPoint and create a new presentation.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /N "Path\templatename.potx"

This example specifies the name of the template that the new presentation is based on — templatename.potx.

If a template name is not supplied, PowerPoint starts a new presentation based on the blank template (in effect, the same as using the /N switch without a template name).

/O

Start PowerPoint and specify a list of files to open.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /O File name1.pptx, File name2.pptx

/P

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.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /P "MyFile.pptx"

/PT

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

If you do not want to see PowerPoint at all, use the /PT (Print To) switch.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /PT "PrinterName" "" "" "MyFile.pptx"

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.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /PMO "MyFile.pptx"

/RESTORE

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.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /RESTORE

/S

Open the specified presentation file as a slide show.

Example: "c:\program files\microsoft office\office12\POWERPNT.exe" /S "Presentation1.pptx"

Top of Page Top of Page

Available switches and parameters for Office PowerPoint Viewer 2007

 Note   Quotation marks are required if there are spaces in the path or file name. Quotation marks will not do any harm, so it is a good idea to always use them.

Switch or parameter Action
/D

Show the Open dialog box when the presentation ends.

Example: "c:\program files\microsoft office\office12\PPTVIEW.exe" /D

/L

Read a playlist of PowerPoint presentations contained within a text file.

Example: "c:\program files\microsoft office\office12\PPTVIEW.exe" /L "Your_Play_List.txt "

 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.

Example: "c:\program files\microsoft office\office12\PPTVIEW.exe" /N5 "Presentation.pptx"

This example opens Presentation.pptx at slide 5.

/S

Start the Office PowerPoint Viewer 2007 without showing the splash screen.

Example: "c:\program files\microsoft office\office12\PPTVIEW.exe" /S

/P

Send the presentation to a printer, and print the file.

Example: "c:\program files\microsoft office\office12\PPTVIEW.exe" /P "Presentation.pptx"

This example prints the Presentation.pptx file.

Top of Page Top of Page

 
 
Applies to:
PowerPoint 2007