Do to detect outlook is running or not in client?
-
Hi, I have one client application that have send email function which use the EmailInterop. The code is like this: NMailItem itemEmail = EmailInterop.OpenEmailItem("", "", "", Enums.EmailType.Normal); But if the outlook is not running in the client, the application have problem. I want to prevent user send mail if the outlook is not running now. So how to detect the outlook is running or not in the client? thanks.
-
Hi, I have one client application that have send email function which use the EmailInterop. The code is like this: NMailItem itemEmail = EmailInterop.OpenEmailItem("", "", "", Enums.EmailType.Normal); But if the outlook is not running in the client, the application have problem. I want to prevent user send mail if the outlook is not running now. So how to detect the outlook is running or not in the client? thanks.
Something like:
For Each p As Process In Process.GetProcesses
If p.ProcessName = "OUTLOOK" Then
Console.WriteLine(p.ProcessName & " / " & p.MainWindowTitle)
End If
Next
Console.ReadLine()