How to prevent users sending emails without subject entered in Outlook?
While you send an email through Outlook, in some times, you can send emails without subject entering which maybe is not a good habit. Is there any way to force users to send email with a subject in Outlook?
There is no way except VBA code to solve this problem.
1. Enable Outlook, press Alt + F11 keys to open Microsoft Visual Basic for Applications window.
2. Double click ThisOutlookSession in the Project1 pane, then copy and paste below code to the blank script.
VBA: Prevent sending email without subject
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'UpdatebyExtendoffice20180511 Dim xObject As Object On Error Resume Next If Item.Class <> olMail Then Exit Sub Set xObject = CreateObject("VBScript.Regexp") With xObject .Global = True: .Pattern = "^\x20*$" If .test(Item.Subject) = True Then MsgBox "No subject entered", vbInformation, "Kutools for Outlook" Cancel = True End If End With End Sub
3. Save the code, now if the email you send without subject, it will pop out a dialog to remind entering subject.
Note: This VBA code work for all accounts in Outlook
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.