Microsoft Outlook 2007 does not validate for empty subject lines when sending out mails. This article provides a mechanism to achieve the same.
These days, in the expert world, Outlook is most famously utilized as the email customer. The title is a vital piece of any email. A decent headline can draw in the consideration of the email peruse. How often has it happened to you that you have sent an email through Outlook without a title? In the wake of tapping the Send button, you understand that you have committed an error. Is it true that you are neglecting to remember the headline for messages? Viewpoint doesn't approve for an unfilled headline.
We'll follow these steps to validate an empty subject line for Outlook 2007.
- Go to Tools -> Macro -> Visual Basic Editor. Or, directly press Alt + F11.
- The Visual Basic editor window gets opened.
- On the left pane, you will see Microsoft Outlook Objects or Project1, expand this. Now, you will see the ThisOutLookSession entry
- Double click on ThisOutLookSession. It will open up a code pane.
- Copy and paste the following code in the code pane:
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