Attach to existing Excel Instance
I'm trying to determine whether or not an instance of Excel of running with a particular file open, and if so attach to it so I can control that instance. I've searched around and the majority of what I've got have come from this question. It has a reference to another site , but unfortunately it's dead for me so I cannot read up on it. My code so far is; //Is Excel open? if (Process.GetProcessesByName("EXCEL").Length != 0) { Process[] processes = Process.GetProcesses(); foreach (Process process in processes) { //Find the exact Excel instance if (process.ProcessName.ToString() == "EXCEL" &&