2

I would like to be alerted before I send an email if the email I am composing contains a certain phrase.

Example: Hi (Client Name),

I would like to be alerted if I forgot to change "(Client Name)".

A similar situation is when you use the word attached in GMail, the client will alert you if you haven't actually attached a file.

1
  • Not that it really maters, but Outlook (2013 at least) also does the same thing when it detects a variation of the word "attach". :) – Ƭᴇcʜιᴇ007 Sep 29 '15 at 19:04
2

Sure, you can easily achieve the desired result with the following VBA macro:

Public Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    On Error Resume Next
    If InStr(Item.Body, "(Client Name)") Then
        If MsgBox("Are you sure to send this message?", vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Message Text Warning") = vbNo Then
            Cancel = True
        End If
    End If
End Sub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.