We have built a VSTO-SE add in for Outlook 2003.

Our add-in functionality can be be initiated in 2 ways, manually or can be set to initiate after given period of time, something like "auto send/receive mail" functionality.

But sometimes when our add-in initiates a process (e.g. auto initiate process) outlook stops responding and crashes. We have to forcefully kill the Outlook process. This is happening more frequently now.

Some possible reasons that we came across are:
  • When we are switching between mail folders sometimes outlook freezes.
  • User is checking for new mails when outlook freezes.
We have not been able to replicate this issue with debug mode on. Is there any explanation for this behavior.


Re: Visual Studio Tools for Office Outlook addin stops responding

John R. Durant - MSFT


This behavior may have a lot to do with what your add-in does when it starts up. Please explain in greater detail what is occuring. Adding source code is also helpful.



Re: Visual Studio Tools for Office Outlook addin stops responding


Hi John,

Our outlook plug-in is built to synchronize calendars between Google and Outlook.

Now what our automatic synchronization feature does is, whenever outlook opens after a specific period of time (say 15 min) our add-in starts synchronizing calendars.

But there is a catch. sometime this features freezes the Outlook. It doesnĄ¯t happens every time. But when-ever it does user has to kill the Outlook process and restart the Outlook (or sometimes his system).

There are elaborate try catch blocks in our system, but still no where we could catch this error.

Also once when automatic synchronization was happening and I was changing/shifting between different mail folders and suddenly it froze. No exception was thrown (as plug-in was still running in debug).

Sorry I could not post code but I am jotting down brief description of process:

  1. forms Timer is started (for 15 min in the ThisApplication)
  2. after 15 min Tick event is raised.
  3. Open sync form and hide it (visibility false and hide in task bar).
    1. In this sync form a background worker is used to complete the synchronization process.
  4. Once process is complete form is closed.

I would appreciate any help. Thanks


Re: Visual Studio Tools for Office Outlook addin stops responding

Mike Walker

Are you using any threads in this process, additionally it is possible that your Program is not the cause but the traffic created between the machine and a storage such as Exchange and the timer is a potential gotcha as the user may click Quit in Outlook as your timer just kicks off, have you registered to catch events on Outlook processing things such as Explorer_close.

Debug information would be useful on the machine and possibly a trace log being added to your code to allow you to log the activity and what processes are happening and see whether a certain part of your code is consistently failing, otherwise we are trying to find a needle in a haystack without more information sorry


Re: Visual Studio Tools for Office Outlook addin stops responding


We are using a backgroundworker but no Threads.

We implemented extensive event logging in out tool and found following error logged in system event log. This hanging occurred when i left my laptop locked for 2 hours. When i logged back in Outlook was On but not responding.

I could still receive mails and see them scrolling in the outlook but i couldnt interact with outlook.

I am not saying its outlooks fault, and most probably its been because of my code. I hope this error log might help.

Product: Windows Operating System
Event ID: 1002
Source: Application Hang
Version: 5.2
Symbolic Name: ER_HANG_LOG
Message: Hanging application %1, version %2, hang module %3, version %4, hang address 0x%5.

Hanging application OUTLOOK.EXE, version 11.0.6353.0, hang module hungapp, version, hang address 0x00000000.

Re: Visual Studio Tools for Office Outlook addin stops responding


I'm sunil, doing my final MCA project on developing a plugin for outlook
I'm very much new to .net environment and by boss asked to do research how to do it.
After continuous search of sever weeks i came to know that i need VSTO and office 2k3 prof.

But, I just got stuck up with how to add a button to tool bar when the user click on reply or reply all or new message button.
Can you please tell me how to add the button to that window

Also I need to create a folder and just populate the viewing pane with data from my company database in a grid.
Is this possible for me

Thank you

Re: Visual Studio Tools for Office Outlook addin stops responding

Misha Shneerson - MSFT

Siddhu, it is exremely hard to troubleshoot deadlocks (which I assume is happening) w/o having a memory dump or ability to look on the stack. Unfortunately, troubleshooting your application deadlock is beyond what this forum can cover, so I will be closing this thread.