How to set condition for outlook exists?


#1

How to set condition for outlook exists (Opened) or not?


#2

Hey @vijayvvk11

Try this:

int procCount = 0;
Process[] processlist = Process.GetProcessesByName("OUTLOOK");
foreach (Process theprocess in processlist)
{
    procCount++;            
}
 if (procCount > 0)
{
  //outlook is open
}

Regards…!!
Aksh


#3

Thank you Aksh


#4