I have written an AddIn for Excel using C# and COM Interop. It is working fine, but there is something that I want to do that I havent been able to find any information about.
I want to access the Application object for the current, existing spreadsheet from which the AddIn is being invoked. I know that I can do this to get an Application reference for a new Excel instance:
However, I dont want a new instance; rather, I want the existing Application object that represents the Excel instance from which my C# AddIn is currently being invoked.
How do I get this current, existing Application instance from within the C# COM Interop code that implements my AddIn?
Thanks in advance.
I want to access the Application object for the current, existing spreadsheet from which the AddIn is being invoked. I know that I can do this to get an Application reference for a new Excel instance:
Code:
Excel.Application app = new Excel.Application();
How do I get this current, existing Application instance from within the C# COM Interop code that implements my AddIn?
Thanks in advance.