导入Outlook附件 [英] Importing Outlook Attachments

查看:111
本文介绍了导入Outlook附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我编写了用于从Outlook 2007导入未读电子邮件的C#应用​​程序,可以将发件人名称,发件人邮件地址,主题和正文导入数据网格视图,如下所示:

Hi,
I wrote C# application for import unread e-mails from outlook 2007, I could import sender name, sender mail address,subject and body to data grid view as following

foreach (Microsoft.Office.Interop.Outlook._MailItem mailItem in fldEmails.Items)
             {
                 if (mailItem.UnRead)
                 {

                     UnreadEmails mail = new UnreadEmails();

                       // mail.AttachmentContent = (mailItem.UnRead == false) ? string.Empty : mailItem.Attachments.Session.OpenSharedItem;

                     foreach (Microsoft.Office.Interop.Outlook.Attachment Atmt in mailItem.Attachments)
                     {
                         mail.AttachmentContent = (mailItem.UnRead == false) ? string.Empty : Atmt.DisplayName;
                     }

                     emails.Add(mail);

                 }


             }




UnreadEmails是一个单独的类.但找不到导入附件(word,pdf,ppt,excel)的方法,因为我的过滤器需要它



但是我可以导入附件的名称,但是我需要将附件内容(word,pdf,ppt等)导入此数据网格,请告诉我如何使用代码




UnreadEmails is a separate class. but couldn''t find a way to import attachments (word, pdf, ppt, excel) because I need it for my filter pls help me about it


but I could import inly name of the attachment but I need to import attachment content (word, pdf , ppt .. etc. ) to this data grid pls tell how I can do it ... with the code

推荐答案

看看此链接

这篇关于导入Outlook附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆