Creating a subject line is like creating a work of art. This line says how important it is to have subject when we send emails.Sending mails without the subject has always been a problem for most of us. Most of us forget to fill the subject line due to some reason or the other. Gmail and Rediffmail take care of this problem internally. But Yahoo and Outlook doesn’t have any mechanism to stop such mails that doesn’t have subject. I might not be able to provide you a solution to prevent this from happening in Yahoomail. But I have a solution to prevent it in Outlook.
Outlook allows us to write macros, which would stop us sending mails without a subject. All we have to do is to write a macro and save it. That takes care of preventing us for sending mails without a subject line.
To create a macro that pops up and asks if we really need to send a mail without a subject, follow the steps
- Open outlook
- Press Alt + F11 or click Tools –> Macro –> Visual Basic Editor to open the VB editor
- Press Ctrl + R or click view –> Project Explorer to open the project on the left side pane.
- Expand Project1 and you would find “Microsoft Office Outlook Objects”, Expanding this would show you “ThisOutlookSession”.
- Double click on “ThisOutlookSession” and paste the following lines.
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
Save the project and close it. Now try sending an email without subject line. A message box would pop up saying that there is no subject line and would you wish to continue sending the mail. Clicking “yes” would continue sending the mail and Clicking “No” would stop your mail. That’s it. Now you have an option to pen down your subject line even if you had forgotten it earlier. :-)