操作已中止(HRESULT异常:0x80004004(E_ABORT))C#

时间:2017-06-19 14:59:23

标签: c#

最近,当我运行此代码时,出现以下错误Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))。我最近刚开始遇到这个问题。基本上,当我运行此代码时,它会检查是否禁用了插件,然后启用它。我现在不确定为什么我会收到这个错误。

我的代码如下

        foreach (COMAddIn currentAddIn in myApp.COMAddIns)
        {
            if (currentAddIn.ProgId == "Create.ExcelAddIn" && !currentAddIn.Connect)
            {

                    currentAddIn.Connect = true;
            }
       }

0 个答案:

没有答案
相关问题