hi i wrote following code for save some mails (already imported to data grid using MAPI) to selected inbox folder in button click
Outlook.MAPIFolder oMailFolder = null;
Outlook.Application oApp = new Outlook.Application();
Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
MailItem moveFilteredMails = null;
oMailFolder = oNS.PickFolder();
oApp = null;
oNS = null;
List<UnreadEmails> filteredList = (List<UnreadEmails>)dgvUnreadMails.DataSource;
foreach (UnreadEmails item in filteredList)
{
moveFilteredMails.Move(oMailFolder);
}
but after selecting inbox folder from pickfilder method it gives a exception saying that
NullReferenceExceptionException was unhandled and Object reference not set to an instance of an object.
pls help to find the error