Outlook Addin“TO / CC / BCC”文本框

时间:2014-07-18 10:46:44

标签: c# winforms outlook-addin

我可以在outlook addin中使用“TO / CC / BCC”文本框吗? 我想添加一个接收盒,我需要上述控件的所有功能。 对此有何帮助?

1 个答案:

答案 0 :(得分:1)

很久以前我用过这个。看看:

Outlook.Application oApp;
Outlook.MailItem mailItem;
oApp = new Outlook.Application();
mailItem = oApp.CreateItem(0);
Outlook.Recipient recipent = this.mailItem.Recipients.Add("sample@mail.com");
recipent.Type = (int)Outlook.OlMailRecipientType.olTo;
mailItem.Display();

对于CC和BCC:

recipent.Type = (int)Outlook.OlMailRecipientType.olCC;
recipent.Type = (int)Outlook.OlMailRecipientType.olBCC;