1. Open your outlook mail client.
2. You can do this either by pressing Alt+F11 or frpm Tools -> Macros -> Visual Basic Editor menu. This will open the Visual Basic editor
3. On the Left Pane, you can see "Project1", expand this and you would see “Microsoft Office Outlook Objects”. Expand it again and now you would see “ThisOutLookSession”. (If you are not seeing "Project1", press Ctrl+R or View-> Project Explorer).
4. Double - Click on “ThisOutLookSession”.
5. Copy and Paste the following code in the right pane.(Code Pane)
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(strSubject) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbSystemModal + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub
6. Now close the VB editor. From now on , this macro will make sure you do not make the mistake of sending an email without subject
Note:
You need to enable macros in the outlook for this code snippet to work. Also, make sure that under Tools -> Macros -> Security menu the level is NOT set to "Very High".