Most of us forget to fill the subject line due to some reason or the other.
Sending mails without the subject has always been a problem for most of us(Since, as usual our Manager gets point to taunt us on this topic
Outlook doesn’t have any mechanism to stop such mails that doesn’t have subject.
But I have a solution to prevent it in Outlook.(Just follow the trailing steps)
Its all done by macros in Outlook that allows us to modify the functionalities of outlook, 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.
Please note: Before going ahead with the main steps, please make sure that following settings are in place, because once the main steps are proper and you try to send the mail, Macros work fine, but after restarting the Outlook the Macro settings get Reset(This happens because we save Macro for current session), So after a very long research the following Pre-requisite steps Solves this issue:-
Pre-requisite steps:.
1. In the Tools menu, click Trust Center.
2. Click on Macro Security.
3. Now Click the options that you want:
i. No warnings and disable all macros Click this option if you don't trust macros. All macros and security alerts about macros are disabled.
ii. Warnings for signed macros; all unsigned macros are disabled This is the default setting and is the same as the Disable all macros with notification option, except that if the macro is digitally signed by a trusted publisher.
iii. Warnings for all macros Click this option if you want macros to be disabled, but you want to get security alerts if there are macros present. This way, you can choose when to enable those macros on a case by case basis. (My Recommendation)
iv. No security check for macros (Not recommended) Click this option to allow all macros to run. This setting makes your computer vulnerable to potentially malicious code and is not recommended.
If you select option (iii), then after restarting Outlook there will be a pop-up that will ask whether to enable or disable the Macro.... (Always Select "Enable Macro", to get the proper functionality)
If selected option is (iv), the functionality will still be proper, but its recommended that you don't play with security levels.
***************************************
Now, just follow the main Steps:
To create a macro that pops up and asks if we really need to send a mail without a subject, follow the steps:
1. Open outlook
2. Press Alt + F11 or click Tools –> Macro –> Visual Basic Editor to open the VB editor
3. Press Ctrl + R or click view –> Project Explorer to open the project on the left side pane.
4. Expand Project1 and you would find “Microsoft Office Outlook Objects”, Expanding this would show you “ThisOutlookSession”.
5. 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
End If
End If
End Sub "
9. Save the project and close it.
10. 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
This will also, prevent you from you Manager, who always give you lecture on this foolish mistake.....
Regards,
Amit Ahuja
