Forgot to mention subject while writing an official mail and feel bad later ???
Yes, it’s a concern for all. A mail without a subject brings a bad impression on us.
To avoid this, just follow the simple steps mentioned below and see the result.
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 following code in the right pane. (Code Pane) and save it.
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
6. Now whenever u try to send a mail without subject, it’ll raise a pop-up to remind you. Cool no??





Found this with a Google search. I’m running Outlook 2007 and evidently it will not notify you if you try to send a message without a subject. I’ve followed the instructions above but it coughs up an error. The VB editor opens and the 1st line is highlighted. Any ideas? I know nothing about VB.
Thanks!
Hi Jackie,
I struggled a lot to replicate the same error in my Outlook and finally got what could be wrong in there..
If I am not wrong, you have just copy-pasted the above code in that code window. In fact, I have asked to do that much only but there is a small correction.
When you copy-paste the code, those double quote(“) are not taken as the intended double quote but some junk characters. (may be some codec problem but not sure what is that) Just delete those quote and type-in fresh double quote characters, it should work fine.
Let me know the result.
Cheers!
This fixed it not working for me in 2007. Re-type all quotes, then exit outlook and restart it. You should get a warning about macros, hit enable.
Thank you!
hi i have done as said above still i can send emails without subject.
The syntax will still not work unless you change “Check for Subject” to “Check AND Subject”.
Change that and your script should work fine.
No, this is not the problem. If this doesn’t work, then there could be some problems with the macro security issue. Go to Tools -> Trust Center. On the left hand side of the Trust Center panel, click Macro Security. Now make sure you have either the Warnings for all macros or No security check for macros checked. If you choose the Warning…, then every time, you start the Outlook, you will get a warning and macros disable. Choose enable macro at the bottom. Have fun.
@ Archana
sorry for late reply. i think there is some basic problem, not with the script, because it worked for me, at least for the first time. but now it is not working for me also, don’t know why. ‘ll come back with the solution soon.
@Heavy
sorry dude, it didn’t work. plz let me know on which version of MS Outlook it works. Mine is MS Outlook 2003. Thanks in advance.
Hi,
The rule worked only once. When i restarted the PC, wasnt working anymore
If this doesn’t work, then there could be some problems with the macro security issue. Go to Tools -> Trust Center. On the left hand side of the Trust Center panel, click Macro Security. Now make sure you have either the Warnings for all macros or No security check for macros checked. If you choose the Warning…, then every time, you start the Outlook, you will get a warning and macros disable. Choose enable macro at the bottom. Have fun.
Thanks your information
Sometimes compiling the Script (it’s in the Script Editor’s Menu) helps
Works perfectly fine for me
It does not work on my system
is there any basic problem in the code with Outlook 2003?
Hi Nitin,
I really don’t think there is problem with the code.
Anyway, let me dig out for more info on how to make it work with Outlook 2003 and get back to you.
Hii
I want the process where i should recived the any POP for only no subject mails in outlook 2003 now if i will assinged same process it is working but for all mail where i have insreted the subject also i am getting the pop so what should i do in this case
Hi Nabil,
Please make sure that you have the correct code in your outlook session. I mean check whether you have used the same variable (“Item” in this case) and see that you haven’t ended the outer IF loop abruptly, etc.. I really don’t see any issues with the code.
Hi
I wanted to publish this macro in all computers in a domain,but it didn’t work.Could I use my exchange server to avoid sending message without subjects?
Hi Ali,
I really don’t have any idea on using exchange server for this purpose.. sorry..
If this doesn’t work, then there could be some problems with the macro security issue. Go to Tools -> Trust Center. On the left hand side of the Trust Center panel, click Macro Security. Now make sure you have either the Warnings for all macros or No security check for macros checked. If you choose the Warning…, then every time, you start the Outlook, you will get a warning and macros disable. Choose enable macro at the bottom. Have fun.
Hi thiendiatuyet,
I could find the script at n number of sites online.
BUT it worked only once for me & for so many of them out there.
But I made the changes suggested by you & it’s working for me damn every time!
You are a problem solver!
Three cheers to you,
-Ambarish
Thank you very much for this. It works !
Kind regards
Francis