使用com object 控制outlook

//z 2012-07-13 16:12:03 IS2120@CSDN.T3153103112[T23,L172,R6,V228]

dynamic app = Activator.CreateInstance(Type.GetTypeFromProgID("Outlook.Application"));
dynamic email = app.CreateItem(0);
email.Subject = "Subject";
email.Body = "Text";
email.To = "email@email.com";
email.Save();
email.Attachments.Add(@"E:\Myimage.jpg");
email.Display(true); //use this to display the Outlook-window
email.Send(); //use this to send the email directly
posted @ 2012-07-13 16:08  BiG5  阅读(128)  评论(0编辑  收藏  举报