This code will end the process OUTLOOK.EXE from the Task Manager. If the user has already opened his Outlook separately, it will be also closed. That is not acceptable for the user.
Dim objOLApp As Outlook.Application
.
.
.
.
Call objOLApp.Quit()
Call System.Runtime.InteropServices.Marshal.ReleaseComObject(objOLApp)
objOLApp = Nothing
I found a solution by removing: Call objOLApp.Quit()
Now there is another problem. OUTLOOK.EXE won't terminate after closing the program and closing the Outlook windows (in case it is opened). I have to do (End Process) from Task Manager.
Any suggestions?