开发者

How to create a button to call my VSTO add-in?

I need to create a button on the workshee开发者_如何学Pythont, that will call function in my VSTO add-in. How I can achieve this?


Check out this helpful link: http://vbadud.blogspot.com/2008/11/call-method-in-vsto-addin-from-visual.html

As it says, you need to make sure you have exposed it for external use. Once it is, the call from excel would look something like this:

Sub Execute_VSTO_Addin_Macro()

Dim oAddin As COMAddIn
Dim oCOMFuncs As Object

Set oAddin = Application.COMAddIns("CallVSTOExample")
Set oCOMFuncs = oAddin.Object

oCOMFuncs.SayHello

End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜