public void MonitorFolderItemEvents(Office.IRibbonControl control) { // Hook into the currently selected folder, and register for events try { Outlook.Folder folder = ((Microsoft.Office.Interop.Outlook.Folder)control.Context); FolderWrapper.CreateFolderWrapper(folder); } catch { } }
public bool IsUnmonitorFolderVisible(Office.IRibbonControl control) { try { Outlook.Folder folder = ((Microsoft.Office.Interop.Outlook.Folder)control.Context); if (folder != null) { return(FolderWrapper.FolderIsMonitored(folder)); } } catch { } return(false); }