Skip to main content

How to prevent users sending emails without subject entered in Outlook?

Author Sun Last modified

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
doc prevent sending whithout subject 1

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

AI Mail Assistant in Outlook: Smarter Replies, Clearer Communication (one-click magic!) FREE

Streamline your daily Outlook tasks with the AI Mail Assistant from Kutools for Outlook. This powerful tool learns from your past emails to offer intelligent and accurate responses, optimize your email content, and help you draft and refine messages effortlessly.
doc ai email handle

This feature supports:

  • Smart Replies: Get responses crafted from your past conversations—tailored, precise, and ready to go.
  • Enhanced Content: Automatically refine your email text for clarity and impact.
  • Effortless Composition: Just provide keywords, and let AI handle the rest, with multiple writing styles.
  • Intelligent Extensions: Expand your thoughts with context-aware suggestions.
  • Summarization: Get concise overviews of long emails instantly.
  • Global Reach: Translate your emails into any language with ease.

This feature supports:

  • Smart email replies
  • Optimized content
  • Keyword-based drafts
  • Intelligent content extension
  • Email summarization
  • Multi-language translation

Best of all, this feature is completely free forever! Don’t wait—download AI Mail Assistant now and enjoy!


Best Office Productivity Tools

Breaking News: Kutools for Outlook Launches Free Version!

Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!

🤖 Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.

📧 Email Automation: Auto Reply (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: Recall Emails  /  Block Scam Emails by Subjects and Others  /  Delete Duplicate Emails  /  Advanced Search  /  Consolidate Folders ...

📁 Attachments ProBatch Save  /  Batch Detach  /  Batch Compress  /  Auto Save   /  Auto Detach  /  Auto Compress ...

🌟 Interface Magic: 😊More Pretty and Cool Emojis   /  Remind you when important emails come  /  Minimize Outlook Instead of Closing ...

👍 One-click Wonders: Reply All with 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 ...

Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Instantly unlock Kutools for Outlook with a single click. Don't wait, download now and boost your efficiency!

kutools for outlook features1 kutools for outlook features2