Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CDO with C#

Status
Not open for further replies.

Prog2000

IS-IT--Management
Mar 19, 2002
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top