using System; using Office = Microsoft.Office.Core; using Outlook = Microsoft.Office.Interop.Outlook; namespace BulkArchiveMailer.AddIn { public partial class ThisAddIn { /// Convenience alias for the inherited Application property, so RibbonController/forms don't need to know the base class's exact property name. internal Outlook.Application OutlookApplication => this.Application; private void ThisAddIn_Startup(object sender, EventArgs e) { // Deliberately does nothing eagerly: no settings/folder/registry // access happens until the operator clicks the ribbon button, // so add-in load never slows down or blocks Outlook startup. } private void ThisAddIn_Shutdown(object sender, EventArgs e) { // Outlook typically no longer raises this reliably before // process exit; nothing here needs cleanup anyway (no open // handles/timers are kept alive between ribbon clicks). } /// Wires up RibbonController (raw Ribbon XML + callbacks, see Ribbon.xml) as this add-in's ribbon UI. protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject() { return new RibbonController(); } } }