Thread: Delete MailItem
View Single Post
  #1  
Old January 23rd 07, 05:17 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default Delete MailItem

Hi,

While i delete MailItem ( myMailItem.Delete() ) should i also call
ReleaseComObject,
and is it good idea to call Application.DoEvents after deleting item??

please review the code snippets:

................
...........
.............
mailItem.Delete();
Application.DoEvents();

Marshal.ReleaseComObject(mailItem);
mailItem = null;

......................
..............................


is it right way ???

TNX in advance;

Ads