public void Inspector_Activate() { Outlook.MailItem mi = inspector.CurrentItem as Outlook.MailItem; if ((mi != null) && (mi.Sent == false)) // activate the butttons on New, Reply and resumed Draft messages { OLRegistryAddin buttonSet = new OLRegistryAddin(); UpdateBody olMessage = new UpdateBody(); olMessage.RemoveOffsiteMessage(mi); olMessage.updateTask(mi, buttonSet.RegCurrentValue()); } Inspector_Close(); }