I'm trying to automate some very simple things in excel, but have run into a roadblock (using c++). To detect excel closing, I just monitor the Excel Process using WaitForSingleObject. In order to close it myself, I just call ExcelApp.Quit(). Really basic stuff. Only problem is - I need to release all dispatches to detect the Excel process closing, but I need those dispatches (at least the application one) in order to close excel myself. Am I missing something? It seems like I can have only one or the other. Also, I am opening multiple instances of Excel, so I can't just use GetActiveObject. Is there something I'm missing or some piece of vital information I need? Maybe I'm completely ignorant towards the way this all works and don't realize it? How can I detect the process closing (or any method to detect excel is exiting) as well as always having a way to interface with that instance of excel? Thanks
Cheers
-Scott