Outlook.Application oLk = new Outlook.Application();
_NameSpace olNS = oLk.GetNamespace("MAPI");
_Folders oFolders = olNS.Folders;
MAPIFolder oFolder;
oFolder = oFolders[1];
MAPIFolder oFolderIn = oFolder.Folders["NetixchangeIn"];
MAPIFolder oFolderOut = oFolder.Folders["NetixchangeOut"];
MailItem oMailItem;
for (int i = oFolderIn.Items.Count; i >= 0; i--)
{
oMailItem = (MailItem)oFolderIn.Items[i];
oMailItem.Move(oFolderOut);
}
|