Command-line switches for SharePoint Designer

You can customize how Microsoft Office SharePoint Designer 2007 starts by adding switches and parameters to the startup command. For example, you can have the program open a specified SharePoint site or page, open a new copy of an existing page or file, or start without showing the program startup screen.

If you want to use a switch and any associated parameters just one time, you can type the command in the Microsoft Windows Run dialog box. Alternatively, if you want to make your customized way of starting Office SharePoint Designer 2007 available for multiple uses, you can create a desktop shortcut that always starts the program by using the same switch and parameters.

A table lists the switches and parameters that are available in Office SharePoint Designer 2007.

In this article


What are commands, switches, and parameters?

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

A switch appears as a space after the main command, followed by a forward slash (/) and the name of the switch, and sometimes followed by another space and then one or more specific instructions called parameters, which give the program further information about how to execute the command. There are also some parameters that can be added directly to certain commands with no switch in between.

For example, the following command instructs Office SharePoint Designer 2007 to start and then to open a new copy of an existing page.

SPDesign command with switch and parameter

Callout 1 The command SPDesign.exe tells the program to start.
Callout 2 The switch /n tells the program to open a new copy of an existing page when it starts.
Callout 3 The parameter http://My_server/My_site/My_page.aspx identifies the existing page of which the program is to open a copy.

Top of Page Top of Page

Use a switch once by typing it in the Run dialog box

  1. Do one of the following:
    • In Microsoft Windows XP or Microsoft Windows Server 2003    Click the Windows Start button, and then click Run. Or you can press the Windows logo key+R.
    • In Windows Vista    Click the Windows Start button Button image, point to All Programs, point to Accessories, and then click Run. Or you can press the Windows logo key+R.
  2. In the Run dialog box, type the command, type a space, and then type the switch and any parameters. For example, you might type:

spdesign.exe /n http://My_server/My_site/My_page.aspx

 Note   If the parameter is a path to a location on your computer, it must be enclosed in double quotation marks — for example:

spdesign.exe /n "C:\My Templates\My_page.aspx"

Paths used as commands or parameters must be enclosed in quotations marks because the operating system might stop reading the command when it encounters a space. For example, if you type spdesign.exe c:\Documents and settings\username\My_site, you may receive an error message stating that the program cannot open the file C:\Documents.

The next time that you start Office SharePoint Designer 2007, the program will return 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, /N functions the same as /n.
  • Remember to include one blank space before the switch and one before each parameter.

Top of Page Top of Page

Make a switch available for reuse by creating a shortcut

First, verify the location of the SPDesign.exe file on your computer. If you accepted the default folder locations when you installed Office SharePoint Designer 2007, the SPDesign.exe file is probably located at:

C:\Program Files\Microsoft Office\Office12\SPDesign.exe

If you do not find the SPDesign.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 one double quotation mark ("), enter the full path for the SPDesign.exe file (including the file name), and then type another double quotation mark. (Alternatively, click Browse to locate and select the file. In this case, the quotation marks are supplied automatically.)
  3. After the closing quotation mark, type a space, and then type the switch and any parameters. For example, you might type:

"c:\program files\microsoft office\office12\spdesign.exe" /n http://My_server/My_site/My_page.aspx

 Note   If the parameter is a path to a location on your computer, it also must be enclosed in double quotation marks — for example:

"c:\program files\microsoft office\office12\spdesign.exe" /n "C:\My Templates\My_page.aspx"

Paths used as commands or parameters must be enclosed in quotations marks because the operating system might stop reading the command when it encounters a space. For example, if you type spdesign.exe c:\Documents and settings\username\My_site, you may receive an error message stating that the program cannot open the file C:\Documents.

  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 SharePoint Designer 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 to the program at startup.

 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.

Top of Page Top of Page

Available switches and parameters

The following table lists all switches and parameters that are available in Office SharePoint Designer 2007.

Switch and parameter Description
/safe

(switch only, no parameter)

Starts Office SharePoint Designer 2007 in Office Safe Mode, which allows you to safely use an Office or Office family program that has encountered certain startup problems. When a problem is detected at startup, Office either fixes the problem or isolates it, allowing the program to start successfully.

For more information about Office Safe Mode, see the article Work with Office safe modes.

file

(parameter only, no switch)

Starts Office SharePoint Designer 2007 and opens the specified site, page, or file.

The parameter file can be either the URL for a site or page on a server or the path to a site or file on your computer.

Note that if the parameter is a path to a location on your computer, it must be enclosed in double quotation marks.

Examples of valid parameters:    

  • http://My_server/My_site
  • http://My_server/My_site/My_page.aspx
  • "C:\Document and Settings\username\My Documents\My Web Sites\My_site"
  • "C:\Document and Settings\username\My Documents\My Web Sites\My_site\My_page.apsx"
/n file

(switch and parameter)

Starts Office SharePoint Designer 2007 and opens a copy of the specified page or file as a new document.

The parameter file can be can be either the URL for a page in a site on a server or the path to a file on your computer.

Note that if the parameter is a path to a location on your computer, it must be enclosed in double quotation marks.

Examples of valid parameters:    

  • http://My_server/My_site/My_page.aspx
  • "C:\Document and Settings\username\My Documents\My Web Sites\My_site\My_page.aspx"
/q

(switch only, no parameter)
Starts Office SharePoint Designer 2007 without showing the program's startup screen.

Top of Page Top of Page

 
 
Applies to:
SharePoint Designer 2007