ActivateMicrosoftApp Method

Microsoft Excel Visual Basic

Activates a Microsoft application. If the application is already running, this method activates the running application. If the application isn't running, this method starts a new instance of the application.

expression.ActivateMicrosoftApp(index)

expression    Required. An expression that returns an Application object.

index    Required XlMSApplication. Specifies the Microsoft application to activate.

XlMSApplication can be one of these XlMSApplication constants.
xlMicrosoftWord
xlMicrosoftPowerPoint
xlMicrosoftMail
xlMicrosoftAccess
xlMicrosoftFoxPro
xlMicrosoftProject
xlMicrosoftSchedulePlus

Example

This example starts and activates Word.

Application.ActivateMicrosoftApp xlMicrosoftWord