This event handler checks for blank subjects as well as if you try to
reply to a message with a blank subject.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
Dim Msg As Outlook.MailItem
Dim subj As String
If TypeName(Item) <> "MailItem" Then Exit Sub
Dim badSubjects() As Variant
badSubjects = Array("RE: ", "FW: ", " ")
Set Msg = Item
subj = Msg.Subject
If IsInArray(badSubjects, subj) Then
If MsgBox("Subject line is empty. Are you sure you want to send
this message?", _
vbQuestion + vbYesNo + vbMsgBoxSetForeground, "No
Subject") = vbNo Then
Cancel = True
End If
End If
End Sub
Function IsInArray(arr() As Variant, valueToCheck As Variant) As
Boolean
' returns true if value is found in array
IsInArray = (UBound(Filter(arr, valueToCheck)) > -1)
End Function