Open another Office app from Excel

R

Rohit Thomas

Hello all,

Can anyone provide some sample code to open an Office
application such as Outlook from Excel using a macro?

Thanks,
Rohit Thomas
 
R

Rohit Thomas

Thanks Vasant. Appreciate the help...
-----Original Message-----
Hi Rohit:

Look at the ActivateMicrosoftApp method; e.g.:

Application.ActivateMicrosoftApp xlMicrosoftMail

will activate or open Outlook.

Regards,

Vasant.





.
 
R

Rohit Thomas

My next question which i should have asked in the original
post. How do I do the opposite. Quit an Office app like
Outlook from Excel using a macro?

Thanks,
Rohit
 
V

Vasant Nanavati

Hi Rihit:

Something like:

Sub CloseOutlook()
Dim OL As Object
On Error Resume Next
Set OL = GetObject(, "Outlook.Application")
On Error GoTo 0
If OL Is Nothing Then
MsgBox "Outlook is not running!"
Else
OL.Quit
End If
End Sub

Regards,

Vasant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top