Microsoft KB Archive/134742

= OFF95: Using Startup Switches for Programs on OSB =

Article ID: 134742

Article Last Modified on 7/18/2007

-

APPLIES TO


 * Microsoft Office 95 Standard Edition
 * Microsoft Office 97 Professional Edition
 * Microsoft Office 97 Standard Edition

-



This article was previously published under Q134742



SUMMARY
To customize a button on the Office Shortcut Bar (OSB) so that it performs a specific action when you click it, add a startup switch to the command line for the icon.



MORE INFORMATION
By default, the target or command line in the properties dialog box contains only the path to and the name of the application's executable file. To add a startup switch for the application on the Office Shortcut Bar, use the following method:
 * 1) To bring up the Properties dialog box, click the Office Shortcut Bar icon with the right mouse button, and click Properties.
 * 2) Click the Shortcut tab.
 * 3) In the Target box, type a space at the end of the command line, and then type the desired startup switch or switches for the application.
 * 4) Click OK to close the Properties dialog box.
 * 5) Click the application's icon to start the application with the switches in effect.

The following is a list of valid startup switches that you can be used for the Microsoft Office applications.

NOTE: Do not include the angle bracket (< >) characters in the actual text that you enter on the command line.

Also, note that the command line(s) for Microsoft Office 97 applications will generally include a different path. For example:

  C:\Program Files\Microsoft Office\Office\Excel.exe

instead of

  C:\Msoffice\Excel\Excel.exe

Microsoft Word
  To start Microsoft Word                           Startup switch ---  Open an existing document Start with no document open                      /n Run a macro and prevent the AutoExec macro       /m from running Prevent the AutoExec macro from running          /m Load a Word add-in                               /l Prevent add-ins and global templates             /a (including the Normal template) from loading With no Tip of the Day                           /w Create a file from a template                    /t

For example, to open Microsoft Word without the Tip Of The Day and open a file called "My Test File.doc" the command line would be as follows:

C:\Msoffice\Winword\Winword.exe /w "c:\My Documents\My Test File.doc"

Microsoft Excel
  To start Microsoft Excel                          Startup switch Open a specific file Without a new, unsaved workbook                  /e Specify a working directory                      /p Open a file read-only                            /r

For example, to open Microsoft Excel and specify the working directory to be "c:\My Directory" and open a file called "My File.xls" as read-only, the command line would be as follows:

C:\Msoffice\Excel\Excel.exe /p "c:\My Directory" /r "My File.xls"

PowerPoint
  To start Microsoft PowerPoint                     Startup switch

Open a specific file Run a slide show automatically                   /s Print the presentation                           /p Create a new presentation                        /n

For example, to open Microsoft PowerPoint and automatically start a slide show called "c:\My Documents\Slide Show.ppt", the command line would be as follows:

C:\MSOFFICE\POWERPNT\POWERPNT.EXE /s "c:\My Documents\Slide Show.ppt"

Microsoft Access
  To start Microsoft Access                            Startup switch

Open a specific database Open the database exclusively                    /Excl Open the database as read only                   /Ro Start using a user name                          /User Start with a specific password                   /Pwd Use a specific user profile                      /Profile Compact a database and close Microsoft Access    /Compact Repair the database and close Microsoft Access   /Repair Convert database from an earlier version         /Convert Run a specific macro                             /X Specify return value for the Command function    /Cmd Start without displaying the startup dialog      /Nostartup Start in run-time mode                           /Runtime Start using the specified workgroup information  /Wrkgrp file (Microsoft Access 97 only)

