Microsoft KB Archive/50816
WordBasic Shell Command Defined
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
The WordBasic Shell command starts another program under Microsoft Windows.
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
Shell "C:\EXCEL\EXCEL.EXE",2 Starts Microsoft Excel and minimizes the window
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 : kbofficeprog
Issue type :
Last Reviewed: March 28, 2000