Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8928587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:28:31+00:00 2026-06-15T08:28:31+00:00

Added: thanks to user @grapkulec, I am using using Microsoft.Exchange.WebServices.Data; I am trying to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:28:33+00:00Added an answer on June 15, 2026 at 8:28 am

    Solved!

    The Move command failed regardless of several attempts because the ID was malformed. Apparently a move operation doesn’t allow use of names. I had tried DisplayName as an identifier and that’s what kept throwing me off. Finally, I gave up on DisplayName, which would have helped. Instead I pointed to the ID (which stopped the annoying “ID is malformed” error) by storing it in a variable, and the move worked.

    Code:

    Folder rootfolder = Folder.Bind(service, WellKnownFolderName.MsgFolderRoot);
    rootfolder.Load();
    
    foreach (Folder folder in rootfolder.FindFolders(new FolderView(100)))
    {
        // Finds the emails in a certain folder, in this case the Junk Email
        FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.JunkEmail, new ItemView(10));
    
        // This IF limits what folder the program will seek
        if (folder.DisplayName == "Example")
        {
            // Trust me, the ID is a pain if you want to manually copy and paste it. This stores it in a variable
            var fid = folder.Id;
            Console.WriteLine(fid);
            foreach (Item item in findResults.Items)
            {
                // Load the email, move the email into the id.  Note that MOVE needs a valid ID, which is why storing the ID in a variable works easily.
                item.Load();
                item.Move(fid);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got some data inputed by the user that should be added to a
I have a user control that allows items to be added to it by
I added a Session controller to my application for user sign-in / sign-out, using
Currently, each web service for our application has a user parameter that is added
I added the email permission to the User & Friend Permissions of my Auth
I have a User model that has among other things an email and a
Update: I've added the following code: function TSettingsForm.AppDataPath: string; //CSIDL_APPDATA Individual user Data //CSIDL_COMMON_APPDATA
I developed web services using CXF. Today i added the simple user name token
I'm using user.skip_confirmation! To skip the devise email confirmation when a new user is
I added a hoverboard on my site that flips over to reveal more text.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.