0

我已经构建了一个 EXCEL 2013 Add In。这在我的开发机器上成功运行。我可以在同一台机器上使用 Click-Once 部署安装此加载项。一般来说,这个插件可以在我的机器上完美运行,无论我是从 Visual Studio 启动,还是我清理项目、从控制面板卸载、从单击一次部署安装。

不运行的症状是加载项的功能区选项卡实际上显示得很好。我在此功能区选项卡上有一个按钮,它将使 CustomTaskPane 可见,只有当我将其安装在装有 Windows 7 的用户计算机上时,功能区选项卡仍会显示,但该按钮不执行任何操作。

我修改了加载项,使其在启动时自动显示 CustomTaskPane。它不会为 windows-7 用户显示。

我查看了机器上的应用程序日志,没有发现任何相关问题。关于如何进一步调试的任何建议?

4

2 回答 2

2

调试步骤:

  • 禁用所有其他加载项
  • 添加一个ButtonRibbon显示TaskPane点播。
  • 在 上添加一些东西Ribbon会检查TaskPane. 就像Visibility财产或其他任何东西,真的。这将确认您的代码可以与TaskPane.
  • 尝试制作TaskPane浮动,如果它已停靠,反之亦然。
于 2014-12-15T21:57:48.890 回答
0

I guess that there should be this error

"Unable to cast COM object of type 'Microsoft.Office.Interop.Word.Something' to class type 'Microsoft.Office.Tools.Word.Something'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface."

Use try catch block and post the error in your question so that I can edit my answer.

于 2014-12-16T20:08:39.463 回答