Can you change the limit on the server? It's a registry entry.
If not, make sure you don't use multiple dot operators but assign everything explicitly to objects where needed. Release all those. Call the garbage collector and wait for it to complete. Make sure you don't have any persistent references to anything.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
<bevan.johnson[ at ]rawlinson-hunter.com> wrote in message news:1145620803.664157.74310[ at ]z34g2000cwc.googlegroups.com...
[Quoted Text] >I have read about this problem all over the forums, but have not come > across any answers yet. > > I am creating MailItem objects within a VSTO C# Outlook add-in, > specifically in the SelectionChange event. This is to allow some > interigation of the selected mailItem. The problem I am facing is that > every time the event fires and a MailItem object is created, the "Open > Messages" count for that user increases by 1 on exchange. Fair enough, > but I cannot get the count to decrease when I move to the next > mailitem. I have tried: > > Marshal.ReleaseComObject(myMail) > myMail.Close("with appropriate switch") > myMail = null > > None of these seem to destroy the object and decrease the count. If I > cannot solve this problem, my whole project dissappears down the > plughole and I will be forced to buy "Off the shelf" Arrrghh. > > Please help me, and thanks in advance. > > Bev. >
|