G
Guest
Hi,
I've no COM experience, and I'm using the following snippet after adding
outlook com module to my references. The code below does the job, so I'm
happy... but also concerned that I'm not getting all cleaned up after the
objects goes out of scope. Do I need any Marchal.ReleaseComObject stuff here??
Outlook.ApplicationClass app = new Outlook.ApplicationClass();
Outlook.MailItemClass mi =
(Outlook.MailItemClass)app.CreateItem(Outlook.OlItemType.olMailItem);
mi.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
mi.Body = sb.ToString();
mi.Subject = "Project definition update";
mi.Display(new object());
I've no COM experience, and I'm using the following snippet after adding
outlook com module to my references. The code below does the job, so I'm
happy... but also concerned that I'm not getting all cleaned up after the
objects goes out of scope. Do I need any Marchal.ReleaseComObject stuff here??
Outlook.ApplicationClass app = new Outlook.ApplicationClass();
Outlook.MailItemClass mi =
(Outlook.MailItemClass)app.CreateItem(Outlook.OlItemType.olMailItem);
mi.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
mi.Body = sb.ToString();
mi.Subject = "Project definition update";
mi.Display(new object());