PDA

View Full Version : Get existing process ID


dovle88
10-19-2004, 08:04 AM
I have an Asp .Net application. I use "Microsoft.Office.Interop.Excel" COM object for editing an spreadsheet, and then save it. But I could not close the excel process, so I want to use the Process class to get the ID of the excel process, and then close it. How can I do this?
I've mannaged to kill all excel processes 'till now. What's the next step?

nathanila
11-23-2004, 06:05 PM
Application.SendKeys "%FX"

This essentially clicks on the File menu and then clicks on the Exit menu item. I don't know if this will work in other languages besides English.