You can use the RunApp action to run a Windows-based or MS-DOS-based application, such as Microsoft Excel, Microsoft Word, or Microsoft PowerPoint, from within Microsoft Access. For example, you may want to paste Microsoft Excel spreadsheet data into your Microsoft Access database.
Setting
The RunApp action has the following argument.
Action argument | Description |
---|---|
Command Line | The command line used to start the application (including the path and any other necessary parameters, such as switches that run the application in a particular mode). Enter the command line in the Command Line box in the Action Arguments section of the Macro window. This is a required argument. |
Remarks
The application selected with this action loads and runs in the foreground. The macro containing this action continues to run.
You can transfer data between the other application and Microsoft Access by using the Microsoft Windows dynamic data exchange (DDE) facility or the Clipboard. You can use the SendKeys action to send keystrokes to the other application (although DDE is a more efficient method for transferring data). You can also share data among applications by using Automation (formerly called OLE Automation).
MS-DOS-based applications run in an MS-DOS window within the Windows environment.
In Windows 98, there are a number of ways to start an application, including starting the program from the Windows Explorer, by using the Run command on the Start menu, and double-clicking a program icon on the Windows Desktop.
You can't run the RunApp action in Visual Basic. Use the Visual Basic Shell function instead.