Subject Reminder in Outlook

Have you ever sent a mail from outlook without subject and feel bad after that? then here is the solution. 

Follow below steps and you can get rid of it. 

  • Open Outlook.
  • Navigate Tools->Macro->Visual Basic Editor (Alt+11)
  • In the left pane, expand Project1->Microsoft Outlook Objects
  • Double click on “ThisOutlookSession”
  • In the right pane copy below code and save it (see the image).      

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground + vbDefaultButton2, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

     subject reminder  

  • Navigate Tools->Macro->Security
  • Select either “Warnings for all macros” or “No Security Check for macros” (1st option will ask enable macro while starting Outlook where 2nd option will directly enable without your inputs)
  • Click on OK. 

Note: For Outlook 2010 users no need to follow above steps. Subject reminder is inbuilt in 2010 version.

If you dont want to lower your macro sucurity level, create certificate for your macro. It enables you to keep your macro security high. Read below link to create your own certificate for your macro.

Now test sending a mail without subject. You will get a warning message. 🙂