Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 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
Posted
Updated 30-May-10 3:47am
v4
Comments
Henry Minute 30-May-10 9:48am    
I have changed the subject of your question since I could not see anything in it about buttons or datagrids.
Kasunmit 30-May-10 14:02pm    
ok ok that's ok thanx for ur help ...

1 solution

Have a look at this link here.
 
Share this answer
 
Comments
Kasunmit 30-May-10 14:03pm    
hey !! thank you so much for ur help ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900