none
Outlook 2003 deactivates AddIn RRS feed

  • Question

  • Hi,

    i have created an AddIn for Outlook 2003 with VisualStudio 2008 and VSTO 3.0. Sometimes the AddIn is deactivated by Outlook. Afaik this can happen when an error occures while the Addin is loaded. I could only reproduce it when i kill the Outlook process during startup.

    Is there a way to change this behaviour and prevent Outlook from deactivating the AddIns?

    Thanks,

    Nick

    • Moved by Ionut Duma Friday, March 1, 2013 2:55 PM english question
    Thursday, February 28, 2013 10:26 AM

Answers

  • In general when writing a COM addin you must handle every possible error not only directly in the code but also by handling unhandled errors in the thread.
     
    You also must isoloate any managed code addin in its own AppDomain so you don't get problems if there's an error in another addin or in Outlook. VSTO addins supply their own isoloted AppDomains, so that's OK.
     
    Even then it's possible for Outlook to disable you for errors that you just cannot handle (for example an exception fired in kernel32), or even in the latest versions of Outlook for taking too long to startup your addin when it gets connected.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Nick__D" <=?utf-8?B?Tmlja19fRA==?=> wrote in message news:f9a335b2-14b2-4ae7-9cae-ed7751aa77a7...

    Hi,

    i have created an AddIn for Outlook 2003 with VisualStudio 2008 and VSTO 3.0. Sometimes the AddIn is deactivated by Outlook. Afaik this can happen when an error occures while the Addin is loaded. I could only reproduce it when i kill the Outlook process during startup.

    Is there a way to change this behaviour and prevent Outlook from deactivating the AddIns?

    Thanks,

    Nick


    Ken Slovak MVP - Outlook
    Friday, March 1, 2013 6:59 PM

All replies

  • Hello Nick,

    This is a German speaking forum so I will move this thread to English forums where you may get better help.

    Have a nice day,

    Ionut

    Friday, March 1, 2013 2:54 PM
  • In general when writing a COM addin you must handle every possible error not only directly in the code but also by handling unhandled errors in the thread.
     
    You also must isoloate any managed code addin in its own AppDomain so you don't get problems if there's an error in another addin or in Outlook. VSTO addins supply their own isoloted AppDomains, so that's OK.
     
    Even then it's possible for Outlook to disable you for errors that you just cannot handle (for example an exception fired in kernel32), or even in the latest versions of Outlook for taking too long to startup your addin when it gets connected.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Nick__D" <=?utf-8?B?Tmlja19fRA==?=> wrote in message news:f9a335b2-14b2-4ae7-9cae-ed7751aa77a7...

    Hi,

    i have created an AddIn for Outlook 2003 with VisualStudio 2008 and VSTO 3.0. Sometimes the AddIn is deactivated by Outlook. Afaik this can happen when an error occures while the Addin is loaded. I could only reproduce it when i kill the Outlook process during startup.

    Is there a way to change this behaviour and prevent Outlook from deactivating the AddIns?

    Thanks,

    Nick


    Ken Slovak MVP - Outlook
    Friday, March 1, 2013 6:59 PM