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.
-or-
[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.
-or-
[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 SubAt 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.
[6] Now whenever you try to send a mail without subject, a pop-up is raised to remind you of the blank subject.
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.