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

Discussion in 'Outlook' started by Shy, Apr 21, 2017.

  1. Shy

    Shy

    Joined:
    Apr 21, 2017
    Messages:
    1
    Likes Received:
    0
    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 secondemail@xyz.com 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 secondemail@xyz.com
    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 otherparts@abc.com 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.
     
    Shy, Apr 21, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. briananderson
    Replies:
    0
    Views:
    958
    briananderson
    Sep 30, 2011
  2. Samrowe

    VBA Code to print 1 page on email

    Samrowe, Apr 3, 2012, in forum: Outlook
    Replies:
    0
    Views:
    577
    Samrowe
    Apr 3, 2012
  3. appnzllr

    Dynamic code for the Read Page

    appnzllr, May 18, 2012, in forum: Outlook
    Replies:
    0
    Views:
    566
    appnzllr
    May 18, 2012
  4. waynephelps
    Replies:
    0
    Views:
    812
    waynephelps
    Jul 9, 2012
  5. batman13

    outlook crashes and won't send email

    batman13, Oct 6, 2014, in forum: Outlook
    Replies:
    0
    Views:
    376
    batman13
    Oct 6, 2014
  6. sudhir
    Replies:
    0
    Views:
    1,005
    sudhir
    Dec 17, 2015
  7. paik1002

    macro for paste and format method

    paik1002, Dec 15, 2016, in forum: Outlook
    Replies:
    0
    Views:
    214
    paik1002
    Dec 15, 2016
  8. Ariojade
    Replies:
    0
    Views:
    175
    Ariojade
    Jan 17, 2017
Loading...