Use this macro to disable the blank subject warning in Outlook 2010, Outlook 2013, and Outlook 2016.
If you are looking for a macro to warn you that the subject is blank in earlier versions of Outlook, see Macro to Warn Before Sending a Message with a Blank Subject.
Please note: If you need help with this macro, please use the comments section below.
To use, open the VBA Editor using Alt+F11 and paste this into ThisOutlookSession.
Reprinted with permission of Peter Marchert
Option Explicit '====================================================================== ' Prevents Outlook 2010 no-subject warning message ' (c) Peter Marchert -//www.outlook-stuff.com ' 2010-07-15 Version 1.0.0 ' 2010-07-19 Version 1.0.1 ' 2010-08-01 Version 1.1.0 ' 2010-08-31 Version 1.1.1 '====================================================================== Private WithEvents colInspectors As Outlook.Inspectors Private Sub Application_Startup() Set colInspectors = Outlook.Inspectors End Sub Private Sub colInspectors_NewInspector(ByVal Inspector As Inspector) Dim objItem As Object On Error GoTo ExitProc Set objItem = Inspector.currentItem If InStr(LCase(objItem.MessageClass), "ipm.appointment") > 0 Then If objItem.MeetingStatus = 0 Then GoTo ExitProc End If If objItem.EntryID = "" Then If objItem.Subject = "" Then objItem.Subject = " " If objItem.Location = "" Then objItem.Location = " " End If ExitProc: Set objItem = Nothing Set Inspector = Nothing End Sub Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) On Error Resume Next Item.Subject = Trim(Item.Subject) Item.Location = Trim(Item.Location) End Sub Private Sub Application_Quit() Set colInspectors = Nothing End Sub
How to use the macro
First: You will need macro security set to low during testing.
To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. If Outlook tells you it needs to be restarted, close and reopen Outlook. Note: after you test the macro and see that it works, you can either leave macro security set to low or sign the macro.
Now open the VBA Editor by pressing Alt+F11 on your keyboard.
To use the macro code in ThisOutlookSession:
- Expand Project1 and double click on ThisOutlookSession.
- Copy then paste the macro into ThisOutlookSession. (Click within the code, Select All using Ctrl+A, Ctrl+C to copy, Ctrl+V to paste.)
Application_Startup macros run when Outlook starts. If you are using an Application_Startup macro you can test the macro without restarting Outlook by clicking in the first line of the Application_Startup macro then clicking the Run button on the toolbar or pressing F8.
More information as well as screenshots are at How to use the VBA Editor.
This happens to work great but the problem is that it causes an error when scheduling Zoom meetings. Error 300 topic. it is because this script is forcing the subject to be blank. Is there any way to fix this so Zoom meetings can be set without issues?
Will this work for outlook.com? If not, is there a way to disable that feature when using outlook.com? Thanks!
It is outlook desktop for windows only (works with any account type). You can't use VBA in Outlook on the web.
There is no way to disable the warning in Outlook on the web - sorry.
I have Outlook 2016 and I can't even do step 1. No VGA box opens when I press Alt and F11.
Is VBA addin enabled in File > Options > Addins?
Customize the ribbon (Options > customize Ribbon) - and enable the Developer tab. You can open the VBA editor using the button on the left of that ribbon.
Thank you. I eventually got it by using the "Tell me what you want to do..." and putting in "Open VBA Editor".
Works with 2016
Thank you! This Macro worked seamlessly when you follow the explicit directions! Kewl Stuff!
Thanks Diane! Will this work on 2013 outlook too?
yes, it will work with 2016 and 2013.
whats the starting point and end point I need to copy paste into the outlooksession?
You should include everything from Option Explicit to the last End Sub. If you double click in the code to select all then copy (either right click, copy or Ctrl+C) you'll copy the entire code piece, properly formatted (Even though it might be on big block of text after you double click.)
Works beautifully! Thank you!!!!!!! I hate that message!