End Google Ads 201810 - BS.net 01 --> Hi,
I am working on shared add-in in c# for Excel. Let us consider 3 components A,B,C. Where A is a Shim,B is Shared an add-in(used IDTExtensibility interface) which creates all tool bars, menu items for Excel and C is an automation add-in which contains UDFs.

I have static property in Automaion add-in(C) which set/gets Excel Application object. Whenever OnConnection(..) of shared add-in is called from the framework, I am setting the Excel application object using this property. So When I type some UDF in Excel, it uses this Excel application object for further work on Excel.

Recently I tried to remove the Shim and put the VSTO on it. When I use VSTo, it doesn't use shared add-in.Here also I set the Excel application object by using static property. Now I have I enabled this Auotomation add-in(add-in->Options->Automation Tab).But when I type some UDF in Excel cell, excel object is not available that is set from VSTO.How do I pass reference to Excel object to Automation add-in so that the same Excel Object is available in Automation add-in when we type some UDFs.

What I observed here is VSTO and Automation add-ins are working in different AppDomains.

Please help me.
Thanks.