Outlook Tips : To prevent sending mails without mentioning ’subject’

To prevent sending mails without mentioning ‘subject’ use this code.

Steps – Open you outlook, press ALT+F11. On left pane in ‘Microsoft Outlook objects’, expand to see ‘This outlook session’. Double click to open the editor. Copy and paste the following code and save the session.

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

11 thoughts on “Outlook Tips : To prevent sending mails without mentioning ’subject’

  1. It remained there for that session, but when I restarted outlook, its no longer working…any clue?

  2. Hi Ashutosh Sharma,

    1.In Outlook Go to Tools > Macros > Security > In the Security Level Tab > Select the option MEDIUM > OK
    2.Now Restart the Outlook, a dialog box pops up to Disable / Enable the macros; select as Enable Macros (this option will pops up when ever you restart outlook.
    3.From now on , this macro will make sure you do not make the mistake of sending a mail without subject

    Now the problem is that. All macros are disabled.

  3. you should do this code for all users outlook, but i have more that 200 users,,,can i do this from exchange server to prevent sending outlook email without subject to all users???????

  4. you should do this code for all users outlook, but i have more that 500 users,,,can i do this from exchange server to prevent sending outlook email without subject to all users???????

Leave a Reply

Your email address will not be published. Required fields are marked *