问题 I have developed one outlook add-in, that has to be On or Off. to do that i have declared one static variable as shown below, ThisAddIn.cs public static bool isAddInOn = false; RibbonButton.cs private void btnRibbon_Click(object sender, RibbonControlEventArgs e) { if (ThisAddIn.isAddInOn ) { ThisAddIn.isAddInOn = false; btnRibbon.Label = "Disabled"; } else { ThisAddIn.isAddInOn = true; btnRibbon.Label = "Enabled"; } } It is working. But the static variable reset again when i close outlook and