Application.AppExecute Method (Project)

Starts an application.

Syntax

expression. AppExecute( _Window_, _Command_, _Minimize_, _Activate_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Window Optional String The caption of the application to activate.
Command Optional String The command to start the application. Required if Window is omitted. If the application is running, Command is ignored.
Minimize Optional Boolean True if the main window is minimized. The default value is False.
Activate Optional Boolean True if the application is activated. The default value is True.

Return Value

Boolean

Example

The following example starts and activates Microsoft Excel.

Sub StartMicrosoftExcel() 
 AppExecute Command:="Excel.exe" 
End Sub