RunApp Action

Description

You can use the RunApp action to run a Microsoft Windows-based or MS-DOS–based application, such as Microsoft Excel, Microsoft Word for Windows, or Microsoft PowerPoint®, from within Microsoft Access. For example, you may want to paste or link Microsoft Excel spreadsheet data into your Microsoft Access database.

Setting

The RunApp action uses the following argument.

Action argument

Description

Command Line

The command line used to start the application (including the path name and any other necessary parameters, such as switches that run the application in a particular mode). 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 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 using OLE Automation.

MS-DOS–based applications run in an MS-DOS window within the Windows environment.

This action has the same effect as double-clicking a program icon in a Windows program group or running a program from the Run dialog box in the Windows Program Manager. In Windows 95, there are a number of ways to start an application, including starting the program from the Windows Explorer, 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.