Accessing Excel Com add-in from Excel XLL add-in

Add-in Express™ Support Service
That's what is more important than anything else

Accessing Excel Com add-in from Excel XLL add-in
can not get progid 
moodys com


Guest


hello

I have an Excel Com add-in, and would like to access this Com add-in from my XLL add-in,
below is my code to get the instance of that Com add-in,(C# code)

Excel.AddIn aComAddin = null;
foreach (Excel.AddIn aAddin in CurrentInstance.ExcelApp.AddIns)
{
if (aAddin.progID.Equals(theComAddInProgId))
{
aComAddin = aAddin;
}
}
the problem is, all of my add-ins' progid is empty, i'm definitely sure that i have configured the ProgId attribute in that Com add-in.

Any suggestion?

Thanks,

Eric Tang
Posted 21 Sep, 2011 22:34:04 Top
eric tang


Guest


Opps! I solved the problem!
code:
Microsoft.Office.Core.COMAddIn aComAddin = null;
foreach (Microsoft.Office.Core.COMAddIn aAddin in CurrentInstance.ExcelApp.COMAddIns)
{
if (aAddin.ProgId.Equals(theComAddInProgId))
{
aComAddin = aAddin;
}
}
now i got the correct add-in instance.
Posted 22 Sep, 2011 00:00:14 Top
Eugene Astafiev


Guest


Hi Eric,

You broke the ice! Thank you for letting us know.
Posted 22 Sep, 2011 02:42:11 Top