Consulting

Results 1 to 3 of 3

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

  1. #1

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

    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

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,812
    Location
    Bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    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?
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •