Macro: VBA code to move/forward email based on subjects and attachments

Shy

Joined
Apr 21, 2017
Messages
1
Reaction score
1
Hi, if you can please help me with this code it would save me hours. My VBA code has failed to date. Thanks.

I have multiple email addresses set up in Outlook 2016, the email address I want the macro to run on is [email protected] This email address has 2 folders under the Inbox called 'Part1' and 'Other Parts'.

When I run the macro, I want the macro to:
1. Loop through every email in the Inbox of [email protected]
2. If the Email Subject contains "* Part1 * S0#######" and has an attachment, move the email to the Folder called 'Part1'. (example subject lines that fit this criteria include 'Part 1 lego S01234567', 'Lego Part 1 arm S03454325', etc)
3. If the Email Subject contains "Part 2" or "Part3", forward the email to [email protected] and move the email to the Folder called 'Other Parts'.
4. No action is taken on all other emails.
5. The macro ends when all emails in that inbox have been checked.

Thank you so much.
 
Top