Knowledge Base

XL97: Startup Switches for Microsoft Excel 97

PSS ID Number: 159474

Article Last Modified on 5/17/2001


The information in this article applies to:


This article was previously published under Q159474

SUMMARY

Microsoft Excel 97 accepts a number of optional switches that you can use to control how Microsoft Excel starts. This article lists the switches and provides a description of each switch.

MORE INFORMATION

Editing the Microsoft Excel Shortcut to Use the Switches

To use these switches, you can edit shortcut you use to start Microsoft Excel. To do this, 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 appropriate switches. For example, if you want Microsoft Excel 97 to start without creating a new workbook, the target would look something like this:

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

  5. Click OK.

Using a Command Line to Use One Switch at a Time

To use one switch one time:
  1. Click Run on the Start menu.
  2. Type the path to Excel.exe, and add the appropriate switches. For example, use the following command line:

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

  3. Click OK after you type the switch you want to use.
The following table, lists the switches. Note that switches are not case sensitive: /O is the same as /o. Note also that, in some cases, you can use more than one switch at a time. If you do this, you must separate the switches by spaces.
   Switch          Function
   ----------------------------------------------------------------------
				
   /e,             Forces Microsoft Excel to start in embedded mode. Use
   /embedded       this switch when you want to start Microsoft Excel
                   without creating a new workbook (Book1).

                   Example: /e, /embedded

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

                   Example: /i


   /m              Forces Microsoft Excel to create a new workbook that
                   contains a single Microsoft Excel 4.0 macro sheet.

                   Example: /m

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

                     HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel

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

                   Example: /o

  /p <folder>      Sets the active path to a different folder. Use this
                   switch to set the active path to a folder other than the
                   default file location.

                   Example: /p "C:\Windows"

   /r <filename>   Forces Microsoft 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. 

                     For more information about the location of startup 
                     folders, please see the following article in the
                     Microsoft Knowledge Base:

                        Q240150 XL2000: How to Use Excel Startup Folders

                   - 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\8.0\Excel\Options

                     NOTE: When Excel is in Safe mode, the Options dialog 
                     box displays the default settings, not your customized 
                     settings. 
				
   /regserver      Forces Microsoft Excel to register itself and then quit.
                   Use this switch when you want Microsoft Excel 97 to
                   rewrite all of its registry keys and reassociate itself
                   with Microsoft Excel files, such as workbooks, charts,
                   and add-ins.

                   Example: /regserver


   /unregserver    Forces Microsoft Excel to unregister itself and then
                   quit.

                   Example: /unregserver
				

Additional query words: XL97 start up startup

Keywords: kbualink97 KB159474
Technology: kbExcel97Search kbExcelSearch kbExcelWinSearch kbZNotKeyword3