Activating a Microsoft Office application

If the application that you want to start is one of several Microsoft applications, you can use the ActivateMicrosoftApp method of the Application object. For example, the following procedure starts Word:

Sub StartWord()

Application.ActivateMicrosoftApp xlMicrosoftWord End Sub

If Word is already running when the preceding procedure is executed, it is activated. The other constants available for this method are

♦ xlMicrosoftPowerPoint

♦ xlMicrosoftMail

♦ xlMicrosoftAccess

♦ xlMicrosoftFoxPro

♦ xlMicrosoftProject

♦ xlMicrosoftSchedulePlus

0 0

Post a comment