Access and Outlook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know you can open outlook with a macro, easy right???? It works great. However, can anyone tell me if you can close outlook with a macro or other VBA code? I can't find anything on it so I assume no, but it would be wonderful if you could. Any help would be appreciated. Thank you!
 
If you open it in VBA code
i.e.
Dim outlookObj As Object
Set outlookObj = CreateObject("Outlook.Application")
' Work with outlook here, show it to the user, run commands on it, etc.

now you have a reference to the outlook instance you opened (the object
"outlookObj"), so you can interact with it to close it at some future time:

outlookObj.Quit()
Set outlookObj = Nothing

--
Bryan Reich
Microsoft Office
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


Lucille said:
I know you can open outlook with a macro, easy right???? It works great.
However, can anyone tell me if you can close outlook with a macro or other
VBA code? I can't find anything on it so I assume no, but it would be
wonderful if you could. Any help would be appreciated. Thank you!
 
Back
Top