Aug 25, 2014 at 12:16 PM
Edited Aug 25, 2014 at 12:21 PM
I have created an excel Add-In using Excel-DNA, WPF, C#. In the ribbon a button is added to generate the pdf for the opened excel and this code is working fine.
Now in my another standalone c# application I want to programmatically call the above Add-In (XLL) and call the methods "generatepdf" that will generate the PDF of excel opened.
I am trying to do something like this
Microsoft.Office.Core.COMAddIns myComAddIns = excel.COMAddIns;
COMAddIn AddIn = null;
foreach (COMAddIn myComAddIn in myComAddIns)
string desc = myComAddIn.Description;
if (desc == "AddInForExcel")
AddIn = myComAddIn;
object comAddinObj = AddIn .Object;
1) AddIn.Object is coming null
2) How can I call the methods of excel Add-In like "generatepdf"?
Please help me.