Closign Applications with a Macro of VBA

tmort

Registered User.
Local time
Today, 23:46
Joined
Oct 11, 2002
Messages
92
I'm working around an Outlook Security feature that calls for a prompt when sending email automatically.

I would like to create a macro that would be fired up be task scheduler that would first close outlook, then open another MAPI compliant email program without the security feture, ren the sendobject command, close the second mail program, open outlook and then close Access.

I can open the applicatons OK but I'm not sure how to close any except Access.

I tried:

Option Compare Database

Function close_Outlook()
Dim Outlook As Application
Outlook.Quit
End Function


But I'm off base on that. Any ideas

Thanks
 
I'm sure you figure this out by now but for anyone interested

Dim AppOutl As Outlook.Application
Set AppOutl = GetObject(, "Outlook.Application")
AppOutl.Quit
Set AppOutl = Nothing
 

Users who are viewing this thread

Back
Top Bottom