HOW-TO: Outlook Hack -- Blank Mail Subject Reminder

How many times have you forgotten to include a subject when you send emails through Outlook? If you ask me, I have done that a lot of times. Including subjects in mails is a good etiquette. It gives the mail a formal setting and bats the message across the recipient even though he/she has not read the mail yet. The subject gives the reader a clue as to what the content is, or whether it is important, or worth reading.

To get a warning when sending an email with a blank subject, just follow the simple steps mentioned below and see the result. Kindly read through the entire procedure first before starting to make modifications with outlook.

Here is the procedure:

[1] Launch Microsoft Outlook.

[2a] Press [Alt]+[F11]. This opens the Visual Basic Editor.
[2b] Tools > Macro > Visual Basic Editor.

Then View > Project Explorer to open the project menu Project-Project1 on the left side-bar. Or Press [CTRL]+[R] if you prefer doing this through hot-keys. On Microsoft Outlook 2007, the project title is Project1 (VbaProject.OTM)

[3] On the Left Pane, one can see "Microsoft Outlook Objects" or "Project1", expand this. Now one can see the "ThisOutLookSession".

[4a] Double-click on "ThisOutLookSession". It will open up a Code Pane on the right hand side.
[4a] Right-click on "ThisOutLookSession" and select "Code Pane".

[5] Copy and Paste the following code in the right pane (Code Pane) and Save it:
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, "Check for Subject") = vbNo Then 
  Cancel = True 
  End If 
 End If 
End Sub
At this point you should be seeing a similar window as below. This is a screenshot of Outlook 2007 SP2. You should be seeing a similar window in another version of Microsoft Outlook.

Outlook Hack - Blank Mail Subject Reminder

[6] Now whenever you try to send a mail without subject, a pop-up is raised to remind you of the blank subject.

Outlook Hack - Blank Mail Subject Reminder

If using Microsoft Outlook 2007, configure security settings so the macro will run via Tools > Macro > Security. Set it to Warnings for all Macros.

The next time Outlook is restarted, select Enable Macros for ThisOutlookSession.

Outlook Hack - Blank Mail Subject Reminder

You might also be interested in:


We at pimp-my-rig strive to keep on improving, help us reach that goal by leaving comments or constructive criticisms. Don't miss out on our next feature -- subscribe via RSS (What is RSS?).

Share This