Outlook Tips : To prevent sending mails without mentioning ’subject’
December 1st, 2005 by Michael Sync
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
Filed under Tips and Tricks
November 9th, 2007 at 1:35 pm
after this script is saved you get a macro warning message every time you start outlook.
April 14th, 2008 at 2:55 pm
It remained there for that session, but when I restarted outlook, its no longer working…any clue?
July 30th, 2008 at 6:42 am
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.
August 21st, 2008 at 2:51 am
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???????
December 29th, 2008 at 9:22 pm
Hi,
I paste the code as you suggested, but it is not working.
please help.
February 16th, 2009 at 5:07 am
hi Rudra,
do as Venkatesh Varalu has said. It will work. ur macros are probably disabled.
March 16th, 2009 at 3:52 am
hi
April 11th, 2009 at 5:18 am
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???????
September 23rd, 2009 at 7:17 am
In Outlook 2007 it is not working. do you know any remedy for this?