Consulting

Results 1 to 2 of 2

Thread: Excel VBA to send emails - but continuing the thread from the last sent item

  1. #1
    VBAX Regular
    Joined
    Aug 2017
    Posts
    20
    Location

    Excel VBA to send emails - but continuing the thread from the last sent item

    Hi - I was hoping someone could help me. I was trying to do something similar over a year ago but never got anything to work and it would be really handy if I could get this going.

    I am looking for a VBA to send emails based on certain criteria it finds in an excel document.

    I would like the macro to run down Column P and send a mail each time it finds a cell containing either todays date (date macro is run) or a date in the past.
    If cells in column P are blank or a date in the future no email would be sent. (Dates are normally displayed in written form e.g. 25 July 2019 - not sure if that makes a difference?

    If a suitable date is found then an email would be sent to the email address in the same row which would be in column i.

    Before that email is actually sent I would like the VBA to search the sent mail folder for the last email correspondence sent to that address so that the new email continues on from the previous email thread. (The perfect VBA would search for the last email sent or received to/from this email address - but I believe that would severely effect the speed / this VBA from working)

    In terms of the email itself - The details would be found in the same row as the date and email address that the mail is being sent to.

    • Cc email address - in column J - (often there will be no cc and this column blank)
    • The subject of the email in column Q
    • The greeting - Dear name - to be found in column R
    • The body of the email to be found in column S
    • Signature in column T
    • Attachment location in column U - if none found send anyway



    Many thanks if anyone can help
    Alan

  2. #2
    VBAX Regular
    Joined
    Aug 2017
    Posts
    20
    Location
    Thanks for moving this to the correct section

Posting Permissions

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