开发者

VSTO Ribbon and XLA Addin

I have created a ribbon control using VSTO, and want to call function in xla on click of button, would like to know 1> how can I call xla function from ribbon开发者_JAVA百科 created in VSTO 2> How can I install xla plugin along with ribbon installation


here is how I did it

        var macroFilePath = Path.Combine(addinPath, addinName);
        var addins = Globals.ThisAddIn.Application.AddIns.Add(macroFilePath);

        if (!addins.Installed)
        {
            addins.Installed = true;                  
        }
        var app = Globals.ThisAddIn.Application;

        string macroToInvoke = string.Format("{0}!{1}", LibraryName, FunctionName);
        Globals.ThisAddIn.Application.Run(macroToInvoke);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜