I am trying to use CDO to move messages from Inbox to another folder. I tried using the MoveTo method of the message object but it is not working.
Here is what I am doing
Object [] args = new Object[2];
args[0] = NewFolder.FolderID;
args[1] = NewFolder.StoreID;
MAPI.Message oMovedMsg = (MAPI.Message)oInboxMsg.GetType().InvokeMember("MoveTo", BindingFlags.InvokeMethod, null, oMsg, args);
I also tried using
MAPI.Message oMovedMsg = (MAPI.Message)oInboxMsg.MoveTo(NewFolder.FolderID, NewFolder.StoreID);
Does anyone know the correct way to move messages from the Inbox to another folder using MAPI or CDO
Here is what I am doing
Object [] args = new Object[2];
args[0] = NewFolder.FolderID;
args[1] = NewFolder.StoreID;
MAPI.Message oMovedMsg = (MAPI.Message)oInboxMsg.GetType().InvokeMember("MoveTo", BindingFlags.InvokeMethod, null, oMsg, args);
I also tried using
MAPI.Message oMovedMsg = (MAPI.Message)oInboxMsg.MoveTo(NewFolder.FolderID, NewFolder.StoreID);
Does anyone know the correct way to move messages from the Inbox to another folder using MAPI or CDO