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?
Prevent sending emails without subject entered with VBA
Prevent sending emails without subject entered with VBA
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
Best Office Productivity Tools
Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook
π€ AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...
π§ Email Automation: Out of Office (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Easily Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Boost Your Outlook Productivity with Tabbed Views / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Incoming Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Over 100 Features Await Your Exploration! Click Here to Discover More.