Use VBA to alert if new incoming email fits criteria

Patrick77

New Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Hello,

I receive an automated email 1+ times a day. The emails contain standard text format that contains a few thing that I am interested in and a bunch of information that I generally am not interested in. This is what the email looks like:
_________________________________________________________________
+ TMXX423G MyJob Y JMS JM3


RUN DATE: 11/26/2016 RECORDKEEPING SYSTEM RUN TIME: 20:12:57

< MANY MANY LINES OF DATA >
< MANY MANY LINES OF DATA >
< MANY MANY LINES OF DATA >

38 38
- ** SUCCESSFUL TRANSMISSION **
** FILE ACCEPTED **
___________________________________________________________________


But sometimes it looks like this
_________________________________________________________________
+ TMXX423G MyJob Y JMS JM3


RUN DATE: 11/26/2016 RECORDKEEPING SYSTEM RUN TIME: 20:12:57

< MANY MANY LINES OF DATA >
< MANY MANY LINES OF DATA >
< MANY MANY LINES OF DATA >

110 108 *ERROR*
0 ** ERRORS FOUND IN TRAILER RECORDS OR TOTALS **
** UNSUCCESSFUL TRANSMISSION **
** FILE NOT ACCEPTED **
___________________________________________________________________


There are 2 situations where I'd like to have the email forwarded back to me.
1) When the transmission is unsuccessful as shown above and
2) When the RUN TIME is earlier than 14:00:00

In case 1, it would be good to have the email forwarded with the subject line: Unsuccessful transmission
In case 2, the subject should state: "Check file date/time"

Lastly - I generally I have a inbox rule to move these emails to a non-default folder called Confirmation_Emails, but i am not sure if that makes a difference.

Please let me know if you have any suggestions.
 
Top