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.