Consulting

Results 1 to 2 of 2

Thread: Stopping an email from sending if it DOESN'T have a specific word in the subject line

  1. #1
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    1
    Location

    Stopping an email from sending if it DOESN'T have a specific word in the subject line

    I have found a million versions of "stop it if the subject line is empty" but I'm looking for something that would stop it if it is missing something. In particular, we have client numbers, and if the email gets sent without the client number, we get in trouble. Even after five years, I've sent two just today. All of the client numbers start with 01, 02, 03, 04, or 08. I'm just looking for something that looks to be sure at least one of those numbers is in the subject line before sending. (The numbers are longer, like 02444022, etc, will that matter? They all start with one of those five though.) I'm not even worried if it only checks for 03 and I send an email with 03 but it isn't the full client number - that seems pretty unlikely. If it's easier, maybe even just looking for the zero would work?

  2. #2
    if client number are all the same length (or use the minimum length)

    try like
    if msg.subject like "*0#######*" then
    number of # and 0 to length of client number

    If it's easier, maybe even just looking for the zero would work?
    probably easier, BUT............

Posting Permissions

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