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).

Post a Comment

*
*