none
How to Prevent Outlook from Disabling Add-ins? RRS feed

  • Question

  • We developed a plugin for outlook 2013 and 2016. In normal condition, when user clicks New Email, then the plugin button in the Ribbon, our plugin window will pop up. If the network condition is bad or unstable, such as weak WIFI signal, after plugin button is clicked, the popup window will not show up, and the process is hanging there forever. We have to manually shut down and restart the outlook. After outlook restarted, we can see the warning message: "ADD-IN PROBLEM a problem was detected with an add-in and it has been disabled". After checking the Event log, we found an entry: "Disable Reason: This add-in caused Outlook to crash." 

    we understood that because our plugin causes outlook to crash, so Outlook disabled the plugin.

    My question is: what can we do to prevent Outlook from disabling our plugin? (even it causes Outlook to crash). In other words, we want our plugin always enabled. Is there any configuration changes we can make to prevent it from happening?

     

      

       
    • Edited by Eric Shao Friday, March 2, 2018 1:04 AM
    Friday, March 2, 2018 12:48 AM

All replies

  • Hi Eric,

    >> In other words, we want our plugin always enabled. Is there any configuration changes we can make to prevent it from happening?

    You should make your AddIn stateable to avoid crashing Outlook instead of trying to make AddIn available all the time.

    You could try to add “try catch” block around your addIn connect over wifi, and show message in catch block instead of running your rest code which will crash Outlook.

                try
                {
                    //check network
                    if (true)
                    {
                        //your rest
                    }
                    else
                    {
                        //run code if the network is broken
                    }
    
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
    

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 2, 2018 6:06 AM