We all are aware of the pitfalls of accidently sending a mail without subject line. I was searching for a way around the same. And to my surprise (of course a pleasant surprise) I found this amazing free script on the net. I started using this script almost immediately and it has certainly brought about an amazing improvement in my time utilization.
In lay mans term this script checks whether text has been entered in the subject line.
I tested this script extensively and the one feature that I really liked about this script was that it will still give you an error if you accidently pressed spacebar.
This tiny script proved to be very efficient:
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
To run this script, follow the following steps:
1. Open your Outlook
2. Press Alt+F11. This opens the Visual Basic editor and then Press Ctrl+R which in turn opens a Project-Project 1 (left side)
3. On the Left Pane, one can see “Microsoft Outlook Objects” or “Project1″, expand this. Now one can see the “ThisOutLookSession”.
4. Double click on “ThisOutLookSession”. It will open up a Code pane.
5. Copy and Paste the above mentioned code in the right pane. (Code Pane) and save it.
6. Now whenever u try to send a mail without subject, it’ll raise a pop-up to remind you.
No comments:
Post a Comment