How to capture when my outlook application in desktop goes into Not Responding state?

Hi all, in my automations, i want to do a check to see, if the outlook application is responding or not. Because many times I see the outlook app is in a not responding state due to which my automation fails. Can anyone suggest a way to deal with this issue.
What I am looking for: A solution to check and find if outlook app is not responding and deal with it, to kill or close, etc.

Thanks

@aditya_chapetla

Welcome to the community :slight_smile:

Follow these steps:

  • Drag and drop an “Element Exists” activity onto your workflow.
  • Indicate a UI element within the Outlook application window that typically indicates responsiveness (e.g., the main window title, a toolbar button, etc.).
  • Set the output property to a boolean variable (e.g., isOutlookResponsive).
  • Add a decision or an “If” activity after the “Element Exists” activity to check the value of the isOutlookResponsive variable.
  • If isOutlookResponsive is False, Outlook is unresponsive.
  • In this case:
    • Use the “Kill Process” activity to terminate the Outlook process forcefully.
    • Alternatively, use the “Close Application” activity to gracefully close the Outlook application.
    • You may also log a message or perform any additional actions as needed.

Thanks, however each time the outlook application goes into not responding state, the UI elements effected gets changed. So I cannot use any specific elements.

Hi @aditya_chapetla ,

In an assign activity use the following expression.

Process_list = System.Diagnostics.Process.GetProcesses

Then use an if condition inside a for loop to check if the current process is outlook or not and then check its responding status. based on the status take your required actions.

image

Process list variable type should be

Okay, so is there a way to only find the status of outlook instead of getting list of all processes and then doing a for each?
Like only check the status of outlook, if that is responding or not.

@aditya_chapetla you can use invoke code if you want or if you are trying to reduce iteration in for loop use.

System.Diagnostics.Process.GetProcessesByName("OUTLOOK")

you would still have to use for loop but not your iteration count would just be 1

edit: try this

System.Diagnostics.Process.GetProcessesByName("OUTLOOK").Any(Function(x) p.Responding)

seems to be working for me will return a boolean.

image

Mark this as solution if it works

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.