Has it ever happened to you that you wrote an interesting, meaningful, content rich email but forgot to put a subject before you pressed the Send Button. Earlier, i wrote about writing a Macro for not missing attachments (Read: [How-To] Missed Outlook Attachment,get warned before its too late)
In this article, we will write a Macro for validating Blank Subject in Microsoft Outlook client. Follow the steps below in order to create such a macro
1.) Ensure that Macros are enabled for your Microsoft Office Outlook. Macros don’t work with Microsoft Outlook Express, therefore this setup cannot be achieved with Microsoft Outlook Express.
2.) Ensure that your security level is set to Medium. You can set the security level by clicking on Tools –> Macro –> Security. Set the desired level to Medium.
3.) Traverse through Tools –> Macro –> Visual Basic Editor ( Or press ALT + F11)
4.) Expand Project 1 by clicking on the + sign.
5.) Expand Microsoft Office Outlook Objects.
6.) Double click ThisOutlookSession.
7.) Copy paste the following code.
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
8.) Once the code is pasted, click on Save and then Exit. The above code ensures that when you send an email, the subject line is not blank. If, the length of the subject line is zero, the macro alerts you with a popup.
Am sure, once you have created this macro, you will be able to avoid sending blank subject emails.
You can follow me on Twitter at http://twitter.com/vaibhav1981
Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.
Follow me on Twitter at @vaibhav1981 Empty Subject Line, How To Not Miss Subject, How-To, Macro For Subject, Microsoft Office, Microsoft Outlook, Microsoft Outlook 2003, Microsoft Outlook Client, Microsoft Outlook Express, Missing Subject In Email, Outlook Attachment, Outlook Macro, Subject, Tips, Tutorial