I am working on an Outlook Addin and I have to process a large number of items. This takes quite some time, and so I tried to execute processing on another thread (using Task.Factory.StartNew). However, this causes Outlook to crash accidentally.
I use Redemption to work with MAPITable to reduce the load and load only the relevant data.
- I tried to initialize my RDOSession from both my main thread and my workflow.
- I tried to get MAPIFolders in the main thread and only work with MAPITable in the workflow.
Currently, the only thing that works for me is to execute all my logic in the main thread (in the button click event), however, this blocks the Outlook user interface for a long period of time, which is unacceptable from the user's point of view.
Does anyone have a pointer on how to work with background threads from an Outlook Addin?
source share