OUTBOX: Setting ‘Don’t Crawl On Me’ via Outlook’s object model

A while ago Steve posted information about how to turn of various types of “crawling” in Outlook via named properties that can be set on a store to tell Outlook whether or not it is okay to “crawl” the store in different scenarios.  There are cases where you might have tons of folders in a…


OOM.NET: Like a good standup comic – use scope and have good timing…

Recently, I was helping someone with a Outlook item leak type issue involving a Task FormRegion.  The symptom was that after opening a task, closing it, and reopening the item they were getting the infamous error message, “COM object that has been separated from its underlying RCW cannot be used.”  They were familiar with some…


OOM.NET: Part 5 – Event Planning

Plan For What You Can Control One of the common scenarios in OOM programming in managed code that required calling GC.Collect() was handling events.  As has been discussed earlier in this series, item references need to be released before they go out of scope.  This includes items passed into event handlers.  Take the ItemSend event…


OOM.NET: Part 4 – Don’t Thread On Me

Patrick posted a discussion of multithreading with Outlook Object Model and why it doesn’t help to make OOM calls on a seperate thread… "Outlook Object Model is run in a STA COM server. This means that all OOM calls are executed on the main thread…You don’t gain any performance [when multithreading] because all the calls…


OOM.NET: Part 3 – Back to the Basics, MSDN Must Reads

The Outlook Developer Reference on MSDN has great information on .NET and COM interop which I would consider a prerequisite to any managed code development with Outlook Object Model.  It simply isn’t enough to know how to accomplish tasks with OOM or to call GC.Collect here and there – it is important to understand the…


OOM.NET: Part 2 – Outlook Item Leaks

Outlook item leaks are the most common OOM with .NET issues that we see and I’ve debugged enough of them to compile this list of the four basic mistakes that contribute to item leaks.  An “item leak” is most commonly seen as an item that won’t refresh or can’t be saved in the Outlook UI. …


OOM.NET: Part 1 – Introduction and Why Events Stop Firing…

OOM.NET is not a special API set that was created in managed code.  It is the name I’ve given to a series of posts I’ll do about the “gotchas” of Outlook Object Model development in .NET.  I’ve compiled some notes over time of the most common issues, how to resolve them, and why they exist. …


FYI: COM Interop Changes in .NET Framework 2.0 and Outlook Object Model

If you have seen the error below when using objects from OOM in .NET 2.0 code then the information that Mason posted recently will explain a lot.  The key to avoiding this error is to use the interfaces in OOM not the CoClasses.  Mason explains why in his post… Unable to cast COM object of type ‘System.__ComObject’…