PDA

View Full Version : HOW DO I FORWARD AN EMAIL WITH MACRO using an email that in the body of another email



ssabastianj
10-20-2017, 05:44 AM
I WOULD REALLY APPRECIATE IT IF SOMEONE COULD HELP ME OUT. IVE BEEN TRYING TO UNDERSTAND MACRO LANGUAGE FOR AGES AND I CANT SEEM TO GET ANYWHERE!
HERE IS WHAT I WANT TO DO. I hope this makes sense.

----

I want a macro to read every email that gets sent to my inbox.

IF the subject line begins with "Lost Property at"
THEN extract the whole body of the email as a string - string name "BODY"

SPLIT the the string at the point where "\split" is in the text

I should have these strings only now

BODY_1
BODY_2

i dont think there is a chance of \split being in the body more than once. but if it is, i would want to isolate BODY_1 and concatenate the rest together

I now want the macro to write an email:

to: BODY_1
subject: the subject of the original email
body: BODY_2

SEND

SamT
10-21-2017, 08:50 AM
Bump

gmayor
10-24-2017, 04:35 AM
For this to work as you describe it the first line of the message body should be an e-mail address followed by "\split". If that is the case, there are probably better ways to extract the e-mail address from the body of the message - especially if the message body includes formatting that you might want to keep.

Can you attach a typical message so we can see what we have to work with?