1. Here's a thread that needs an answer: Outlook creating a folder named: "Unwanted"
    Dismiss Notice

VBA Code to move mail items from search folder to inbox subfolder

Discussion in 'Outlook VBA and Custom Forms' started by sushil, Jan 10, 2017.

  1. sushil

    sushil

    New Member
    Need assistance regarding VBA code. I like to move the mail items from a search folder to a subfolder in Inbox. Scenario is I want to automate transfer of one week old mail items to a particular subfolder in the Inbox. I believe that this can not be done using rules. Only option which may be possible that I create a search folder and then use some macro to move those items from the search folder to inbox subfolder. So would like to have some VBA code for such macro which can transfer the mail items form search folder in inbox subfolder
     

  2. Diane Poremsky

    Diane Poremsky

    Senior Member
  3. sushil

    sushil

    New Member
    Diane, thank you for your reply. this is quite useful macro. But in my scenario, it is not only aged email, I want to use some additional criteria also. Search folder give me more liberty as I can change the criteria on search folder based on my requirement and then just want to click a button (macro) to move those items from search folder to a sub-folder.
     
  4. Diane Poremsky

    Diane Poremsky

    Senior Member
    The problem is, a search folder doesn't hold the message, it only holds a pointer to the message. If there isn't a lot of criteria, you can do it in the macro (it's harder to write a complicated filter).
     
    sushil likes this.
  5. sushil

    sushil

    New Member
    Thank you Diane, I will add additional criteria in your macro.
     
Loading...

Share This Page