【发布时间】:2023-01-17 21:43:54
【问题描述】:
在我的 Ribbon.xml 中给出:
<command idMso="FileSave" onAction="SaveIntercept" getEnabled="IsSaveInterceptEnabled" />
在我的 Ribbon.cs 中
public void SaveIntercept(IRibbonControl control, ref bool cancelDefault)
{
if (!IsFileSavedBefore()) <= works :)
{
call here build in FileSave
(Build in function switch tab when file was never saved before)
return;
}
... File was saved before ... continue with my code
}
我已经试过了
RibbonUi.ActivateTabMso("TabSave");
和
Application.CommandBars.ExecuteMso("FileSave");
如何调用原始功能?
【问题讨论】:
标签: c# vsto office-addins