A user asked how to change the New Email button to use a template so all new messages always used the same subject.
You can't set a custom form as the default but you can use VBA to watch for a new item form to open and 'do something' when it does. Because the administrator only wanted to control the subject, it makes more sense to use a macro rather than a custom form.
For the solution to this problem, I tweaked Micheal Bauer's macro at Inspector: Edit new items, so that it only applies to new email.
You can use this method to affect any field in any new item, but for this sample macro, I'm limiting it to just new email messages.
If you want to tag the subject of every message you send, an ItemSend macro might work better as users can't change the subject after hitting Send. If using Exchange server, a transport rule. Also see Disclaimer and Signature tools
Do something when a new item opens code
' Based on http://www.vboffice.net/en/developers/newinspector-and-inspector-activate Private WithEvents m_Inspectors As Outlook.Inspectors Private WithEvents m_Inspector As Outlook.Inspector Private Sub Application_Startup() Set m_Inspectors = Application.Inspectors End Sub Private Sub m_Inspectors_NewInspector(ByVal Inspector As Outlook.Inspector) Set m_Inspector = Inspector End Sub Private Sub m_Inspector_Activate() If TypeName(m_Inspector.currentItem) = "MailItem" And _ m_Inspector.currentItem.Subject = "" Then m_Inspector.currentItem.Subject = "test" End If Set m_Inspector = Nothing End Sub
Add an address to the CC field
To add a recipient, place the Private Sub m_Inspector_Activate() macro in the code sample above with the following code.
Private Sub m_Inspector_Activate() strCC = "alias@domain.com" If m_Inspector.CurrentItem.Class = olMail Then m_Inspector.CurrentItem.Recipients.Add strCC End If Set m_Inspector = Nothing End Sub
How to use the macro
For screenshots, see How to use Outlook's VBA Editor.
Step 1: Verify Macro security is set to low, or self-sign the macro. Outlook will usually mention that macros are disabled when you open the VBA editor, but you should check, just to be sure. Look for this at File, Options, Trust Center, Macro Security in Outlook 2010/2013 or in Tools, Trust Center, Macro Security in Outlook 2007.
Step 2: Open the VB Editor using Alt+F11 keys.
Step 3: This macro needs to go into ThisOutlookSession, which is under Project1.
Step 4: Tweak the macro as needed then click in the Application_Startup macro and click the Run button (or F5). If you need to edit the macro, click and Run the startup macro before testing.
What about the Forms Administrator utility?
In 2000, Microsoft released a Forms Administrator utility that uses a registry key to set custom forms. It was a one-version experiment and the utility was not updated in later releases.
It can still be used (even with Outlook 2013) but there is a reason it was not updated: there are better ways to change default forms.
When used for email, this method creates winmail.dat files, which results in the loss of HTML formatting and may result in the loss of attachments when the recipient is not using Outlook.
From the Microsoft KB article describing FormsAdmin:
In particular, custom e-mail message forms pose the most issues. Therefore, if you change the Outlook default forms, you can experience major issues in some scenarios.
This method will not work with forms that use Forms Regions (Outlook 2007 and later).
More Information
To change a default Outlook form (Outlookcode.com)
Thank you very much!
Your solution works perfect! Your hint on setting macro security to low is indispensable. That is why the code did not work at first.
Also your notes on disappearing HTML formatting and winmail.dat disruption while using forms substitution are 100% true.
Thank you for your solution. I'll stick with it!
I would really appreciate if you could explain to me how to implement the code above for Outlook 2007 (ver.12) because I tried it in macros and get no results whatsoever.
You need to add it to ThisOutlookSession then either restart Outlook or click in the Application_Startup macro and click the Run button. You also need to have macro security set to low.
Yes but my point is that my response really answers the original question, which was "A user asked how to change the New Email button to use a template so all new messages always used the same subject"
Following the steps described at https://msdn.microsoft.com/en-us/library/office/bb176910%28v=office.12%29.aspx leads you exactly to "all new messages always use the same subject"
I can assure you that you have a 100% more Outlook expertize then I do. Still after tedious net surfing only above-mentioned source provided the exact answer to how get your Outlook have the same subject for all new messages by default.
There are a lot of things that can be done, but the unintended consequences often mean that they shouldn't be done.
That article doesn't tell you about the problems that can occur if you use this method - lost attachments, disappearing HTML formatting, etc. And for that reason, it's not a good solution for most users. If you are fine with winmail.dat files and the potential loss of attachments or HTML formatting, use it. Using the new inspector macro to set the subject will not result in a winmail.dat. Setting global properties to use HTML to internet addresses will not prevent winmail.dat files when using published forms.
I am sorry but I believe that your statement ...You can't set a custom form as the default...is erroneous. Please refer to Microsoft Official Subject "Globally Change a Default Form" at https://msdn.microsoft.com/en-us/library/office/bb176910%28v=office.12%29.aspx
The steps provided helped me to Use a default subject for New messages
Thank you
Just because you can do something doesn't mean you should. :)
There is a reason that app was never updated since it's release 13 years ago: Using a published custom form as the default message form may annoy non-Outlook recipients and prevent them from getting any attachments you send them. If you use Exchange server, it may convert it to HTML (the admin controls it) and gmail & yahoo remove attachments from the winmail.dat (you lose HTML formatting), but other servers may present the user with a plain text message and a winmail.dat.