Added: thanks to user @grapkulec, I am using
using Microsoft.Exchange.WebServices.Data;
I am trying to move an email to a folder that I've already created in Outlook (using MS Exchange). So far, I've been able to move the email to the drafts or another well known folder name, but have had no success moving it to a folder I created called "Example."
foreach (Item email in findResults.Items)
email.Move(WellKnownFolderName.Drafts);
The above code works; but I don't want to use the well known folders. And, if I try to change the code to something like:
email.Move(Folder.(Example));
or
email.Move(Folder.["Example"]);
It doesn't move (in both cases, throws an error). I've found tons of examples of how to move emails into folders on MSDN, SO and general C# - but ONLY of folders that are "well known" to Outlook (Drafts, Junk Email, etc), which doesn't work with a folder that I've created.