Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start Excel with different switches.

Best of Excel

How to start Excel with different switches.

by  Hasit  Posted    (Edited  )
The following lists the switches you can use to control how Excel starts. Switches are not case sensitive: /O is the same as /o . In some cases, you can use more than one switch at a time. If you do this, you must separate the switches with spaces, for example: /o /s

1. On the Start menu, click Run .

2. In the Open box, type the path to Excel.exe and add the switch you want to use at the end of the command line. For example, if you want to bypass all files in the startup folders and the Excel.exe file is installed in the default location, you would type the following command:

"C:\Program Files\Microsoft Office\Office\Excel.exe" /s

3. Click OK .


/e, /embedded
Forces Excel to start without displaying the startup screen and creating a new workbook (Book1.xls).

/automation
Forces Excel to start without loading add-ins, templates, or processing files in the XLSTART folder or the Alternate Startup File Location. You can use this switch to perform a "clean-boot" of Microsoft Excel 97. (See also the /s switch, shown below.)

/i
Forces Microsoft Excel to start with a maximized window. Previously saved window size settings are ignored.

/m
Foces Excel to create a new workbook that contains a single macro sheet.

/o
Forces Excel to re-register itself. Specifically, the following key is rewritten in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel

NOTE: If this key contains invalid values, they are not corrected by using this switch. This switch only replaces missing values.

/p <folder>
Forces Excel to use the path you specify as the active
path rather than the default path.

Example: /p "C:\Windows"

/r <filename>
Forces Excel to open the specified file in read-only mode.

Example: /r "C:\My Documents\Test.xls"

/s
Starts Excel in Safe mode. ("Safe Mode" will appear in
the Excel title bar.) Safe mode starts Excel as if it is
the first time after Setup.

Safe mode bypasses the following:

- All files in any Excel startup folder.

- Add-ins: The Addins dialog box still displays the
selected addins. However, the addins are not loaded.

- Excel toolbars (Excel.xlb or <username>.xlb): The
original installation default toolbar settings are used.

- Excel specific registry information: The original
installation default registry settings are used.
Registry information can include the following key and
other keys:

HKEY_CURRENT_USER\Software\Microsoft\Office\9.0Excel\Options

NOTE: When Excel is in Safe mode, the Options dialog box displays the default settings, not your customized settings.

/regserver
Forces Excel to register itself and then quit. Use this switch when you want Excel to rewrite all of its registry keys and reassociate itself with Excel files, such as workbooks, charts, and so on.

/unregserver
Forces Excel to unregister itself and then quit.


If you decide you want to add a switch to the Excel shortcut, then follow these steps:

1. Right-click Start on the taskbar, and click Open on the shortcut menu.

2. Double-click the Programs folder. Right-click the shortcut for Microsoft Excel , and click Properties on the shortcut menu.

3. Click the Shortcut tab.

4. In the Target box, type the switches you want after the command that runs Excel.exe. For example, if you want Excel to start without creating a new workbook, and the Excel.exe file is installed in the default location, you would type the following in the Target box:

"C:\Program Files\Microsoft Office\Office\Excel.exe" /e

5. Click OK .


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top