In classic Outlook for Windows, a local VBA macro can automatically prefix NOENCRYPT when a message opens in a separate compose window, without using Quick Steps.
Add the VBA macro
The macro uses Outlook’s NewInspector event, which runs after a compose window is created but before it appears, and then updates the writable MailItem.Subject property.^1^^2^
- In classic Outlook, press Alt+F11 to open the Visual Basic editor.
- Under Microsoft Outlook Objects, open ThisOutlookSession.
- Paste this code:
Private WithEvents ComposeWindows As Outlook.Inspectors
Private Sub Application_Startup()
Set ComposeWindows = Application.Inspectors
End Sub
Private Sub ComposeWindows_NewInspector(ByVal Inspector As Outlook.Inspector)
Dim msg As Outlook.MailItem
If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then
Set msg = Inspector.CurrentItem
If msg.Sent = False And _
UCase$(Left$(Trim$(msg.Subject), 9)) <> "NOENCRYPT" Then
msg.Subject = "NOENCRYPT " & msg.Subject
End If
End If
End Sub
- Save the VBA project, close the editor, and restart Outlook.
- Select New Email. The separate compose window’s subject should start with
NOENCRYPT.
- If nothing is inserted, your organization may have disabled Outlook VBA through macro-security policy; contact your Microsoft 365 administrator rather than lowering security settings yourself.
This implementation covers messages opened in an Outlook Inspector—a separate message window. It can also affect replies and forwards when they are popped out into separate windows, but it does not guarantee coverage for inline replies in the Reading Pane because those do not open a new Inspector.
Because NOENCRYPT changes your organization’s email-encryption behavior, confirm that automatically applying it to every new message is permitted. The macro leaves an existing NOENCRYPT prefix unchanged to avoid duplicates.
If every supported compose path must be managed centrally
Ask your administrator or developer to deploy an event-based Outlook add-in using OnNewMessageCompose. Microsoft provides a complete walkthrough specifically for automatically setting the subject when a message is created, including support for classic Outlook on Windows.^3^
Important requirements include:
- Outlook/Exchange support for Mailbox requirement set 1.10.
-
MailboxItem.ReadWrite.User permission to change the subject.
- A manifest registering the new-message compose event and its handler.
- Sideloading permission for testing or administrator deployment for organizational use.
Use the complete manifest and handler registration from the Microsoft walkthrough rather than only adding a JavaScript subject assignment. The handler must complete the launch event on both successful and failed asynchronous paths.
This is the better option when the behavior must be centrally deployed, maintained, and governed rather than stored as a macro in one user’s Outlook profile.
No-code alternative: an Outlook template
A template can save NOENCRYPT in the subject, but it is not automatic—you must start each message from that template.
- Select Home > New Email.
- Enter
NOENCRYPT in the subject.
- Select File > Save As.
- Set Save as type to Outlook Template, name it, and save it.^4^
- To compose from it, select New Items > More Items > Choose Form.
- Set Look In to User Templates in File System, select the template, and choose Open.^5^
This avoids Quick Steps and macros, but it cannot behave like a signature on every ordinary New Email action.
References
- Inspectors.NewInspector event (Outlook)
- MailItem.Subject property (Outlook)
- Automatically set the subject of a new message or appointment
- [Classic Outlook](https://support.microsoft.com/outlook/create-email-templates-in-outlook#create-a-template-using-built-in-controls)
- [Classic Outlook](https://support.microsoft.com/outlook/send-an-email-message-based-on-a-template)