Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I sometimes Forgot to mention subject while writing an Mail .

is there any way to prevent it. I got a Solution by Google-ing but not working in MS Office 2007 Edition ,

The Solution is like :

Here are the steps: -

  1. Open your Outlook,
  2. Press Alt+F11. This opens the Visual Basic Editor and then Press Ctrl+R which in turn open 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 on the right hand side.
  5. Copy and Paste the following code in the right pane (Code Pane) and save it and close


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. Continue anyways???"
        If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground,
                  "Check for Subject") =   vbNo Then
            Cancel = True
        End If
    End If
End Sub

Now whenever you try to send a mail without subject, a pop-up is raised to remind you of the blank subject.

Any idea , how it can be done.

share|improve this question

migrated from Sep 18 '09 at 11:22

This question came from our site for system and network administrators.

You say this doesn't work in Outlook 2007, what does it do, any errors? – Sam Sep 18 '09 at 9:40
up vote 4 down vote accepted

Your code is fine - I've just found that my version has stopped working too.

You need to do one of two things:

Either: Open Tools | Trust Center dialog. Set macro security to Warn on all macros. This will warn you whenever you open Outlook but you can run macros.

See this page for more details.

Or: Sign the macro. Open the macro editor (Tools > Macros > Visual Basic Editor) then Tools > Digital Signature and select one from the list. If you don't have any installed follow the instructions on this support page.

You can also create certificates by running

Start > Programs > Microsoft Office > Microsoft Office Tools > Digital Certificate for VBA Projects

Restart Outlook, allow all macros with this signature to run and it should work.

share|improve this answer

I would personally recommend that you switch to Thunderbird, as it is a free product, runs no multiple platforms and is open source. As well, it is more configurable, and includes news reader and RSS reader as well.

Also, you are no more locked in MS Outlook formats, and so your old emails have a better chance to survive the format changes of the coming years.


share|improve this answer
The questioner doesn't mention where he's doing this. There's no point in telling him that there are other mail clients if this is on a company PC connecting to company mail servers. If his company uses an Exchange server there really is no other mail client that properly connects and supports all of the groupware functions. – GAThrawn Sep 23 '09 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .