Click here to Skip to main content
15,894,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi using following code i can import all the personal folder from MAPI

<code></code>
 Outlook.MAPIFolder oMailFolder = null;
            Outlook.Application oApp = new Outlook.Application();
            Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
            oMailFolder = oNS.PickFolder();

            oApp = null;
            oNS = null
;

this gives a Outlook 2007 Select Folder window as a output as following image http://imgsrv.worldstart.com/mso-images/select-folder-outlook-2007.gif

but my issue is i have some filters e-mails in list of data grid view in my program
string senderMailAddress = txtMailAddress.Text.ToLower();

List<unreademails> list = (List<unreademails>)dgvUnreadMails.DataSource;
               //List<string> myUnreadMailList;
               List<unreademails> filteredList = (List<unreademails>)(from ci in list
                                                                      where ci.SenderAddress.StartsWith(senderMailAddress)

                                                                      select ci).ToList<unreademails>();
               dgvUnreadMails.DataSource = filteredList;</unreademails></unreademails></unreademails></string></unreademails></unreademails>


wht i need to do is i need to save those mails in datagrid to selected inbox forder
but dosent have idea to do it :( :(
pls help thanx for ur kind help
Posted

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