有时在使用excel运行我的外接程序时,它会被禁用。有没有办法可以通过编程来启用它?
我尝试过这样的方法,但是COMAddin没有name属性。
这是我到目前为止所掌握的。
xl.Application myApp;
myApp = (xl.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
foreach (COMAddIns currentAddIn in myApp.COMAddIns)
{
if(currentAddIn.Name=="Create")
{ }
}https://stackoverflow.com/questions/44526104
复制相似问题