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.

1. The command SPDesign.exe tells the program to start.

2. The switch /n tells the program to open a new copy of an existing page when it starts.

3. The parameter http://My_server/My_site/My_page.aspx identifies the existing page of which the program is to open a copy.

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

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
, point to All Programs, point to Accessories, and then click Run. Or you can press the Windows logo key+R.

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.

Note:

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.

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.

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

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

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.

Click Next.

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

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.