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 |
|
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. |
|
Eugene Astafiev
Guest
|
Hi Eric,
You broke the ice! Thank you for letting us know. |
|