Microsoft KB Archive/211481

From BetaArchive Wiki

PSS ID Number: 211481

Article Last Modified on 10/8/2003



The information in this article applies to:

  • Microsoft Excel 2000



This article was previously published under Q211481


SUMMARY

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

MORE INFORMATION

Switches

The following table 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

   Switch           Function
   ----------------------------------------------------------------------

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

                    Example: /e


  /embedded         Starts an embedded instance of Excel.
                    The Excel program is not displayed on the screen.
                    However, Excel.exe starts in the background.

                    Example: /embedded


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

                    Example: /m

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

          Excel 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
          Excel 2000 HKEY_CURRENT_User\Software\Microsoft\Office\10.0\Excel                                             
                 
                    Example: /o

   /p <folder>      Forces Excel to use the path you specify as the active
                    path instead of 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. 

                    For more information about the location of startup 
                    folders, 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:
   
  Excel 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Options
  Excel 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
  HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel 


                      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 its 
                    registry keys and reassociate itself with Excel files, 
                    such as workbooks, charts, and so on.

                    Example: /regserver


   /unregserver     Forces Excel to unregister itself and then quit.

                    Example: /unregserver
                

Using Switches When You Start Excel

Adding a Switch to the Microsoft Excel Shortcut

To add a switch to the Microsoft Excel shortcut:

  1. Right-click Start on the taskbar, and then click Open on the shortcut menu.
  2. Double-click the Programs folder. Right-click the shortcut for Microsoft Excel, and then 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

    Note If the options on the Shortcut tab in the Properties dialog box are unavailable, your shortcuts are Windows installer shortcuts. To modify these shortcuts, click the article number below to view the article in the Microsoft Knowledge Base:

    229396 OFF2000: Unable to Modify Office Shortcuts

  5. Click OK.

Running Excel One Time with a Switch by Using the Command Line

If you want to run Excel with a switch occasionally, you can add the switch to the command line. To do this:

  1. Click Start menu, and then click Run.
  2. In the Open box, type the path to Excel.exe and add the switch that 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.



Additional query words: starting start up startup XL2000 launching running activating command-line

Keywords: kbPubTypeKC kbMSCCSearch kbhowto KB211481
Technology: kbExcel2000 kbExcel2000Search kbExcelSearch kbExcelWinSearch