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

December 1, 2005

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
Outlook Tips : To prevent sending mails without mentioning ’subject’

posted in Tips and Tricks by Michael Sync

Follow comments via the RSS Feed | Leave a comment | Trackback URL

9 Comments to "Outlook Tips : To prevent sending mails without mentioning ’subject’"

  1. anonymous wrote:

    after this script is saved you get a macro warning message every time you start outlook.

  2. Ashutosh Sharma wrote:

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

  3. Venkatesh Varalu wrote:

    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.

  4. idris wrote:

    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???????

  5. Rudra wrote:

    Hi,
    I paste the code as you suggested, but it is not working.
    please help.

  6. angel wrote:

    hi Rudra,

    do as Venkatesh Varalu has said. It will work. ur macros are probably disabled.

  7. vije wrote:

    hi

  8. Hesham wrote:

    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???????

  9. msr wrote:

    In Outlook 2007 it is not working. do you know any remedy for this?

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org