Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
#DefineSubRoutine OutlookQuitRoutine() Message("Outlook Quitting", "Subroutine Initiated") Return #EndSubRoutine objOutlook = ObjectOpen("Outlook.Application") oln = objOutlook.GetNameSpace("MAPI") oln.logon("", "", 0, 1) ; OutlookApp = oln.application Message("Outlook Version", OutlookApp.version) ClipPut(OutlookApp.version) ; objecteventadd(OutlookApp, "Quit", "OutlookQuitRoutine") ;<-- 1752 Object does not support events... ; ;foreach Folder in oln.Folders ; message("Debug", Folder.name) ; forEach SubFolder in Folder.Folders ; display(1, "SubFolder", SubFolder.name) ; next ;next ; oln.application.quit oln = 0 ; Exit
I did some poking around in my Outlook help file and found...
Quit Event See Also Applies To Example Specifics Occurs when Microsoft Outlook begins to close. This event is not available in VBScript. Sub object_Quit() object An expression that evaluates to an Application object. Example This example displays a farewell message when Microsoft Outlook exits. The sample code must be placed in a class module, and the Initialize_handler routine must be called before the event procedure can be called by Outlook. Dim WithEvents myOlApp As Outlook.Application Sub Initialize_handler() Set myOlApp = CreateObject("Outlook.application") End Sub Private Sub myOlApp_Quit() MsgBox "Goodbye, " & Application.GetNamespace("MAPI").CurrentUser End SubSo I assume that this isn't a Winbatch Issue ?
Article ID: W17131
File Created: 2007:07:03:14:28:26
Last Updated: 2007:07:03:14:28:26