http://support.microsoft.com/kb/819398/zh-cnOutlook.MailItemClass mItem = (Outlook.MailItemClass)doc.MailEnvelope.Item;
报错无法将类型为"System._ComObject"的COM对象强制转换为类类型"Microsoft.Office.Interop.Outlook.MailItemClass"
报错无法将类型为"System._ComObject"的COM对象强制转换为类类型"Microsoft.Office.Interop.Outlook.MailItemClass"
这句改为:Outlook.MailItem mItem = (Outlook.MailItem)doc.MailEnvelope.Item;
然后把mItem.ItemEvents_Event_Close += new Outlook.ItemEvents_CloseEventHandler(this.wApp_Close);这句删了或者注释起来,就OK了;