When I open Excel from the cmd line with the "excel" command, then
win32com.client.GetActiveObject("Excel.Application")
returns the Excel object I'd expect.
But when I open Excel with a new instance, with "excel /x" from the Command Prompt, then Python doesn't recognize Excel.Application.
My guess is the COM application name is different when opening it this way (e.g. something like Excel.Application2). How can I find out what the COM application name is?
I am calling this Python code from a VBA call to the Shell, so ideally I would like to find the relevant Excel.Application name that called that VBA.
(I've tried digging around the registry and haven't figured it out yet.)