Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Closing Outlook
Hi all
I need to open Outlook an then closing it. Opening function works well, but I do not know how to close it. Could anyone help? Thanks, Aldo. I am using this: 'This is working well Function OpeningOutlookInSelectedFolder() Application.ActivateMicrosoftApp (xlMicrosoftMail) End Function 'This is not working Function ClosingOutlook() Application.Close End Functio -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Closing Outlook
Courtesy of Vasant Nanavati
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 Trevor "ajliaks " wrote in message ... Hi all I need to open Outlook an then closing it. Opening function works well, but I do not know how to close it. Could anyone help? Thanks, Aldo. I am using this: 'This is working well Function OpeningOutlookInSelectedFolder() Application.ActivateMicrosoftApp (xlMicrosoftMail) End Function 'This is not working Function ClosingOutlook() Application.Close End Function --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
Outlook 11 Outlook 10 Object Library Compatibility Issues | Excel Programming | |||
Closing VB triggers closing Excel | Excel Programming | |||
Email - Outlook no Closing Session | Excel Programming | |||
closing excel after closing a workbook | Excel Programming |