• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

sushil

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
#1
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
 

sushil

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
#3
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.
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#4
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

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
#5
Thank you Diane, I will add additional criteria in your macro.