在VBA中访问VSTO方法

时间:2010-06-30 15:56:36

标签: c# vsto

我正在尝试从VBA调用Shared Add-in COM Registerd方法。 我正在使用.NET Framework 2并执行帖子http://blogs.msdn.com/b/andreww/archive/2007/01/15/vsto-add-ins-comaddins-and-requestcomaddinautomationservice.aspx

中的代码

但是当我构建加载项时,我得到了错误

  

'RequestComAddInAutomationService()'找不到合适的方法来覆盖

请有人帮我这个吗?

1 个答案:

答案 0 :(得分:1)

错误消息表明,包含RequestComAddInAutomationService实现的类的基类都不包含该方法的定义。

确保您的课程实际上来自Microsoft.Office.Tools.AddIn

如果你遵循这个演练,也许它会变得更清晰:

  

Walkthrough: Calling Code in an Application-Level Add-in from VBA

相关问题