Skip to content

Outlook Hack : Empty subject warning

 

How many times you have forgot to write subject of emails you sent through Outlook?? The biggest blunder is Outlook doesn’t show any warning ! Here is a hack/macro for it.

Steps:

  1. Open your outlook
  2. Press Alt+F11. This open the Visual Basic editor
  3. On the Left Pane, one can see “Microsoft Outlook Objects”, expand this. Now one can see the “ThisOutLookSession”.
  4. Click on “ThisOutLookSession”.
  5. Copy and Paste the following code in the right pane.(Code Pane)
  6. Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim strSubject As String
    strSubject = Item.Subject
    If Len(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
  7. Now save and close the VB Code editor. From now on , this macro will make sure you do not make the mistake of sending a mail without subject.

For Outlook 2007, please refer Codeproject.

~ Ankit

11 Comments

  1. Hello,
    why every one after Hacking ?

    well if u look at the site (Orkut) any one easily hack if he has some web idea.

    you cna do what u want especally in orkut.
    post images in scap, video in scrap, add unlimited scrap, sensing thousands scrap to friend, add many friends … all u can do …

    yes its easy
    but whats the use ? ” simply waiste of Time”

    check out my profile
    http://www.orkut.com/Home.aspx?xid=9787111520529965928
    u will find may such things ..

    get in touch

    Posted on 14-Aug-07 at 11:28 pm | Permalink
  2. emr

    useful hack, thank you.

    Posted on 02-Oct-07 at 6:15 pm | Permalink
  3. Pasha

    Hi,
    This piece of code does not work in Outlook 2007. It worked in Outlook 2003. My outlook security setting is set to Low only, but still this is not working.

    Any pointers on this would be helpful. Pls reply to my id – shirazpasha@gmail.com

    Regards,
    Pasha

    Posted on 12-Apr-08 at 10:03 am | Permalink
  4. Daniel

    Working code for Outlook 2007

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim Answer As String

    If IsNull(Item.Subject) Or Len(Item.Subject) = 0 Then

    Answer = MsgBox(“Subject field is empty. Do you still want to send the e-mail? “, vbYesNo + vbQuestion, “Missing subject”)

    If Answer = vbYes Then
    Cancel = False

    ElseIf Answer = vbNo Then
    Cancel = True

    End If

    End If
    End Sub

    Posted on 08-May-08 at 7:47 pm | Permalink
  5. cdfrank

    The Outlook 2007 version of the makro does not work too

    Posted on 08-Sep-08 at 7:25 pm | Permalink
  6. cdfrank

    I solved The Outlook 2007 wersion. It works, but you have to check teh ” sign, because the above used is wrong.

    Posted on 09-Sep-08 at 1:16 pm | Permalink
  7. David Balažic

    I used this in OL 2003 and it worked, but now it does not any more. Any idea why ?
    The code is there in VB editor, but it does not work.
    :-(

    Posted on 14-Nov-08 at 10:28 pm | Permalink
  8. Kim

    Hi,

    Cen any one help, using Daniel’s VB code I’m getting an error message about this line:
    Answer = MsgBox(”Subject field is empty. Do you still want to send the e-mail? “, vbYesNo + vbQuestion, “Missing subject”)

    using Outlook 2007 – this is such an annoying thing, and on the Microsoft site they try and charge you for the solution!

    Please help!
    Kim

    Posted on 13-Mar-09 at 6:26 pm | Permalink
  9. Prasad

    Use this code:

    Answer = MsgBox(“Subject field is empty. Do you still want to send the e-mail?”, vbYesNo + vbQuestion, “Missing subject”)

    Its working for me.

    Posted on 08-May-09 at 5:22 pm | Permalink
  10. Karuppiah

    Hi,

    The information is really helpful and I am now feeling happy that the given code remaind me incase if I miss to enter the Subject.

    Really Nice!Thanks a lot!

    Posted on 22-Jan-10 at 12:27 pm | Permalink
  11. Alex

    For those getting the error message: Replace the “ ” with ” ” (double quotes).

    Posted on 25-Aug-10 at 1:37 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image