Flimsiness of Outlook OM

J

john bailo

I notice a certain 'flimsiness' to the Outlook OM.

After running a c# interop against it, the OL client
seems to degrade to the point where I have to
stop/start OL, or log out or reboot to restore
functionality ( such as the MarkAsRead )
property.
 
J

Jay B. Harlow [MVP - Outlook]

John,
Are you releasing your Outlook objects in the correct order?

Specifically are you using
System.Runtime.InteropServices.Marshal.ReleaseComObject to release each COM
(Outlook) object when you are done with it. I understand that you need to be
certain to release children objects before releasing parent objects.
(release Outlook.MailItem before you release Outlook.Application).

Note you may need to call ReleaseComObject repeatedly to ensure that the
returned reference count of the RCW is zero.

Also in case you did not know the following site provides a number of useful
articles on using Outlook with .NET:
http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top