title: How to automate the forced closure of excel, followed by a restart?
body: <p>Occasionally excel freezes or crashes while performing some long running VBA code (runs 24hr/day) and I'm examining ways to handle the restart of excel programmatically.  Any advice on best way to go about this would be appreciated.</p>
  
  <p>One idea i have is to write a dotnet app that might be potentially triggered by, say, a windows logging error event such as 'Event Name: APPCRASH' and 'Faulting application EXCEL.EXE', but i have no idea if this is feasible/sensible way to go about it. </p>
  
  <p>If it happens to be a sensible approach, i would envisage the app potentially performing the following tasks;</p>
  
  <p>1) Auto close/cancel any windows error popup boxes such as "Do you want to send more information about the problem?", "Microsoft Excel has stopped working", or "Microsoft Excel is trying to recover your information."</p>
  
  <p>2) Force close excel if still open (eg if hanging), as well as killing any excel.exe processes</p>
  
  <p>3) Restart excel</p>
  
  <p>Is is possible to write such an app in dotnet?  What references/tags should i be looking for to find further information?</p>
  
  <p>Thanks,
  Yug</p>