protected override void OnClicked(IOfficeApplication application) { var applicationState = application.ApplicationReadyState(); if (applicationState == OfficeApplicationReadyState.Success) { var helper = new PlatformHelper(); helper.SaveOnline(application); } else Utils.ShowErrorMessage(applicationState); }
private void OnAction(IOfficeApplication application, IRibbonControl control) { try { var helper = new PlatformHelper(); switch (control.Id) { case "SaveToWorkshareButton": { helper.SaveOnline(application); break; } case "ShareToWorkshareButton": { helper.ShareOnline(application); break; } } } catch (Exception e) { Logger.LogError(e); } }