close outlook client,
part1:
Public Sub close_Outlook()
Dim myOlApp As Object
Set myOlApp = GetObject(, "Outlook.application"
myOlApp.Quit
End Sub
Sub RunAndCloseOutlookApp()
Dim myOlApp As Object
Dim myNameSpace As Object
'running new outlook app.
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
myNameSpace.GetDefaultFolder(5).Display
'close active explorer:
myOlApp.ActiveExplorer.Close
'or to close all client:
'myOlApp.Quit
End Sub
ide
Because Outlook 2K is a single-instance application, ide's first post is the proper way to shutdown Outlook.
AFA not using the Shell function to start Outlook, that depends. If he wants Outlook to remain open outside his original function, he'll need to use the Shell function (or one of it's variations) or use a variable with scope beyond or above that function. Jon Hawkins
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.