WordBasic Shell Command Defined

ID: Q50816


The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c


SUMMARY

The WordBasic Shell command starts another program under Microsoft Windows.

Syntax


Shell "App$", Window_Style 
App$ uses the same format as the File Run command in the Windows MS-DOS Executive, including any switches or arguments that the program accepts. If App$ is the name of a file with an extension specific to an installed application (.DOC for a Word document, for example), the statement starts the application and loads that file.

Window_Style specifies how the window containing the program should appear, as follows:

   Mode     Window Type
   ----     -----------

   0        Minimized window; default
   1        Normal window
   2        Minimized window (for Microsoft Excel
            compatibility)
   3        Maximized window
   4        Deactivated window 

Example


Shell "C:\EXCEL\EXCEL.EXE",2    Starts Microsoft Excel and minimizes the window 


MORE INFORMATION

If the application that is being shelled is not listed on the PATH statement in the AUTOEXEC.BAT file, and the full directory and path are not stated in App$, then Microsoft Word generates the error message:

Cannot find or run application.
For more information on WordBasic functions and statements, please refer to the "Microsoft Word for Windows Technical Reference."

Additional query words: 2.0 winword winword2 word6

Keywords :
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c
Platform : WINDOWS
Issue type :


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.