Monday, May 30, 2022

RunApplication Macro Action [MS]

You can use the RunApplication macro action in Access desktop databases to run a Microsoft Windows-based application, such as Excel, Word, or PowerPoint, from within Microsoft Office. For example, you may want to paste Excel spreadsheet data into your Access database.

Security Note: Use caution when running executable files or code in macros or applications. Executable files or code can be used to carry out actions that might compromise the security of your computer and data.

Note: Beginning in Access 2010, the RunApp macro action was renamed to RunApplication.

Note: This action will not be allowed if the database is not trusted.


The RunApplication macro action has the following argument.

Action argument


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 design window. This is a required argument.


The application selected with this macro action loads and runs in the foreground. The macro containing this action continues to run after starting the application.

You can transfer data between the other application and Access by using the Microsoft Windows dynamic data exchange (DDE) facility or the Clipboard. You can use the SendKeys macro 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.

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

In Windows operating systems, there are a number of ways to run 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 RunApplication macro action in a Visual Basic for Applications (VBA) module. Use the VBA Shell function instead.

No comments:

Post a Comment

Search This Blog

Use a keyboard to customize the Quick Access Toolbar [MS]

Use a keyboard to customize the Quick Access Toolbar Office 2021 Office...