Many businesses and organizations have begun adding a disclaimer like the one below to all outbound messages.

This Electronic Mail is strictly confidential and is intended for use by the named recipients only. It may contain information which is privileged and confidential. If you are not the intended recipient, or one of them, you must not copy, distribute or disclose it, nor take any action in reliance on it. If you have received this message in error please notify us immediately by telephone. We will reimburse any reasonable costs incurred.

There are two ways to add a disclaimer: at the client (Outlook), at the server (Exchange).  If you want to centrally administer and enforce the use of disclaimers, then you have to use a server-side solution.  There are are a number of 3rd-party server-side tools available such as Symprex Mail Signature Manager.  For those who don’t control their mail server or who’s needs are simpler, there’s a simple solution available using Outlook and a bit of scripting.  The code below adds a disclaimer to every message you send.  Of course you could achieve the same effect by simply including the disclaimer in your signature.  The code solution allows you to create conditions for applying a disclaimer, such as messages addressed to people outside of your organization, or even different disclaimers for different recipients.  Best of all the code applys the disclaimer automatically.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    'Change the text on the following line to that of your disclaimer.
    Const DISCLAIMER_TXT = "<span style="font-size:10pt;" lang="EN-GB">This Electronic Mail is strictly confidential and is intended ...</span>"
    If Item.Class = olMail Then
        Select Case Item.BodyFormat
            Case olFormatPlain, olFormatRichText, olFormatUnspecified
                Item.Body = Item.Body & vbCrLf & vbCrLf & DISCLAIMER_TXT
            Case olFormatHTML
                'Change/add to the HTML on the followng line as desired
                Item.HTMLBody = Item.HTMLBody & "
<hr />
" & DISCLAIMER_TXT
        End Select
        Item.Save
    End If
End Sub

This code should work with any version of Outlook.

One of the more common questions I see is, “Is it possible for Outlook to block sending messages with blank subject lines?”  The answer is “yes”.  This is easily done with a simple bit of scripting.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If Item.Class = olMail Then
        If Item.Subject = "" Then
            Cancel = True
            MsgBox "The message you’re attempting to send has a blank subject.  Enter a subject, then send.", vbCritical + vbOKOnly, "Message Send Aborted"
        End If
    End If
End Sub

The script checks each message as it’s sent.  If the subject line is blank, then the code displays a message letting the user know that the send is being canceled, then aborts the send.  The message is left open onscreen where the user can quickly add a subject and click Send.

This script should work in all version of Outlook (not Outlook Express).

TechNotions is a compilation of my thoughts and ideas on technology.  Some posts will be about areas of technology I’m interested in, others will be about using technology to be more productive.  Since I’m a Microsoft Outlook MVP, many posts will focus on Outlook.  Many of those posts will include sample code that demonstrates how to do something.  The code is provided as is.  If you use it, then you do so at your own risk.  You should test it in your environment before placing it into use.

I hope you find something useful here.

Cheers!