By default, Microsoft Outlook 2007 does not provide any warning message for missing Subject Lines. My office friends often sent mail to customers without any subject line. We can create macro using Visual Basic(VB) to solve this issue. Now lets see the steps to enable subject warning message using Visual Basic. 🙂
Steps to Create “No Subject Warning Message”
1.  Launch Microsoft Outlook 2007.
2. Â Click Tools –> Macro –> Security.
3. Click “Macro Security” and select Warning for all macros as shown below and click ok.
4. Now Press Alt Key + F11, the Microsoft Visual Basic Editor appears.
5. Expand Project1 in the Project pane.
6. Copy and paste the following code in the code pane.
1 2 3 4 5 6 7 8 9 10 | 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$ = "Hey Praveen!!! You have 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 |
7. Click the Save icon and then close Microsoft Visual Basic Editor.
8. Now, restart Microsoft Outlook 2007. Click the Enable Macros button at the following prompt.
9. Send an email with a blank subject line. You should get a warning message.
That’s it! 🙂
Awesome man! Thank you so much.
Super helpful man. Thanks.
Hello! I simply want to give you a big thumbs up for the excellent information you have got here on this post….And Microsoft has a tendency to not provide basic functionality to some of its products. Microsoft Outlook 2007 is no exception.I will be coming back to your blog for more soon.