Tony from North Carolina writes:
I have a question about Microsoft Outlook 2007. I think I inadvertently deleted the pop up that tells me that I forgot to name the subject. How to I restore this function?
Hi Tony,
By default, Microsoft Outlook 2007 does not provide a reminder for missing Subject Lines. However, you can create macro that provides this functionality in Microsoft Outlook 2007. Similar to other macros in Microsoft products, you will create the macro using Visual Basic (VB). I’ll provide the code and you’ll insert and save the code in the Microsoft Visual Basic Editor. Before you create Macro, you’ll need to check the Macro Security settings. Let’s do that now.
Check and Enable the Macro Security Settings
Step 1: Launch Microsoft Outlook 2007.
Step 2: Click Tools > Macro > Security, as shown below.

Step 3: Select Warnings for all macros and then click the OK button.

Now, you’ll create a macro that reminds you to insert a Subject line before sending the email.
Create and Save the Macro
Step 1: Ensure Microsoft Outlook 2007 is open. On the keyboard, keep the Alt key pressed and then press the F11 key. Alternatively, click the Tools > Macro > Visual Basic Editor. The Microsoft Visual Basic Editor appears.
Step 2: Expand Project1 in the Project pane.

Step 3: Double-click ThisOutlookSession. The code pane appears.

Step 4: Copy the following code in the code pane.
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$ = “You’ve left the Subject 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
Tip: The text in italics is the Warning message. You can customize it.
Step 5: To save this macro, click the Save icon and then close Microsoft Visual Basic Editor.

Step 5: Now, restart Microsoft Outlook 2007. Click the Enable Macros button at the following prompt.

Now test the macro. Restart Microsoft Outlook 2007 and attempt to send an email with a blank subject line. You should get a warning message, as shown below.

That’s it!
~Rupen
This works great! Thank you. Do be aware that when the text is red there is a syntax error. For me I needed to replace the quotes and re-save.
Erica, I found this and had to do the same thing. But great little macro Rupen, runs great!
I missed many times the subject line, it helped me a lot. Good Script!!
Erica, what do you replace the quotes with? It keeps giving me an error.
Nice code. Works well!
Re-type quotes before use.
Worked great – after retyping all the quotation marks.
Thanks!
Outlook did message me that this removes the Debug. Plus, I have to allow the macros every time I log in. Any suggestions?
Retyped quotation marks and it worked a treat!
Thanks
Great code! but how can I make the default button set to ‘No’?
work like a charm..
Very very helpful and good article. Steps are very clear.
It work exactly has informed.
short but sweet!
http://www.worldstart.com/warning-for-no-subject-in-microsoft-outlook-2007-email/
hey,
I used this today – yes I’m still using 2007 – and it worked a treat. Many thanks Rupen!