Following the June 13 2017 security update, users discovered published custom forms no longer worked because VBScript behind the form and some controls are blocked with the following error message:
To help prevent malicious code from running, one or more objects in this form were not loaded. For more information, contact your administrator.
This was fixed in the July 27 2017 update but "broken" again by the September 12 2017 update.
The cause of problems with the September 12 2017 update is intentional: Microsoft disabled custom form script functionality. If you need it enabled, you'll need to set two keys, one to enable scripting and a second one with the message class name of each form that has code behind it.
Run this form will not work unless you add the default message class to the second registry key as well. After a new form is published, you'll need to add the form name to the registry too.
After adding the keys, you'll need to restart Outlook.
If the keys in the path don't exist, you'll need to create them.
If Outlook is 32 bit and Windows 64-bit, the keys are here
Windows and Outlook are the same bitness
If Windows and Outlook both have the same bitness, you'll use these keys.
Reminder: You'll need to add a registry value for each message class that will contain scripts. For example, if the custom form is IPM.Contact.custom, youâll need to create a string value using the custom formâs message class. Add IPM.Contact to enable Run this Form during the design process. After the form is published, remember to add the form name to the registry too.
Outlook 2016
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
Use this sample registry file to add the Outlook 2016 keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2016\Windows (same bitness)
Outlook 2013
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
Use this sample registry file to add the Outlook 2013 keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2013\Windows (same bitness)
Outlook 2010
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
Use this sample registry file to add the Outlook 2010 keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2010\Windows (same bitness)
Outlook 2007
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
Sample registry file to add the Outlook 2007 keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2007 32bit, Windows 32bit
Windows 64-bit and Outlook 32-bit
You'll need to add a registry value for each message class that will contain scripts.
For example, if the custom form is IPM.Contact.custom, youâll need to create a string value using the custom formâs message class. Add IPM.Contact to enable Run this Form during the design process. After the form is published, remember to add the form name to the registry too.
Outlook 2016
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom Value: (leave blank)
You can use this sample registry file to add the Outlook 2016 32-bit/Windows 64-bit keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2016 32bit, Windows 64bit
Outlook 2013
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
You can use this sample registry file to add the Outlook 2013 32-bit/Windows 64-bit keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2013 32bit, Windows 64bit
Outlook 2010
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\14.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\14.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
You can use this sample registry file to add the Outlook 2010 32-bit/Windows 64-bit keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2010 32bit, Windows 64bit
Outlook 2007
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\12.0\Outlook\Security DWORD: DisableCustomFormItemScript Value: 0 (to enable)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\12.0\Outlook\Forms\TrustedFormScriptList REG_SZ: IPM.Contact.custom-form-name Value: (leave blank)
Use this sample registry file to add the Outlook 2007 32-bit/Windows 64-bit keys to the registry. Save it as a text file and add your form names to the TrustedFormScriptList key, then save as a reg file and double click to run.
Outlook 2007 32bit, Windows 64bit
Accurately copy the form name
You can accurately copy the form name from a list view if the Message Class field is in the view and in-cell editing is enabled.
You'll need to add the Message Class field to the view, while in-cell editing is turned on by default with list views, except for Mail folders.
Macro to create a reg file
The following macro will write the custom form names in the selected folder to a text file (in your documents folder) then check for duplicates and save a cleaned copy as a .reg file. You'll need to change the registry path if you aren't using Outlook 2016 32-bit on Windows 64-bit.
This will write all message class EXCEPT the default message class to the text file, including all of the messages classes used for NDRs, meeting responses, etc. These do not need to be added to the registry. I added an If statement to remove some of these default form types but may have missed a few.
I tested this on a folder with 5000 items and it took just a few seconds.
To-dos: check all folders and convert to a VBScript.
Sub CreateTrustedFormScriptList() Dim CurItem As Object Dim CurFolder As Folder Dim AllItems As Items Dim strReg As String Dim objFS As New Scripting.FileSystemObject, objFile As Scripting.TextStream ' Use your User folder in the save path Dim enviro As String enviro = CStr(Environ("USERPROFILE")) Set CurFolder = Application.ActiveExplorer.CurrentFolder If Not CurFolder Is Nothing Then Select Case CurFolder.DefaultItemType Case 0 strDefaultClass = "IPM.Note" Case 1 strDefaultClass = "IPM.Appointment" Case 2 strDefaultClass = "IPM.Contact" Case 3 strDefaultClass = "IPM.Task" End Select Set AllItems = CurFolder.Items For Each CurItem In AllItems If CurItem.MessageClass <> strDefaultClass Then ' check for other message classes outlook uses ' there may be more If CurItem.MessageClass = "REPORT.IPM.Note.NDR" Or _ CurItem.MessageClass = "IPM.Schedule.Meeting.Resp.Pos" Or _ CurItem.MessageClass = "IPM.Post.Rss" Or _ CurItem.MessageClass = "REPORT.IPM.Schedule.Meeting.Request.NDR" Or _ CurItem.MessageClass = "IPM.Sharing" Or _ CurItem.MessageClass = "REPORT.IPM.Note.IPNRN" Or _ CurItem.MessageClass = "REPORT.IPM.Note.DR" Or _ CurItem.MessageClass = "IPM.Note.SMIME.MultipartSigned" Or _ CurItem.MessageClass = "IPM.Schedule.Meeting.Request" Or _ CurItem.MessageClass = "IPM.DistList" Then Else strReg = Chr(34) & CurItem.MessageClass & Chr(34) & "=" & Chr(34) & Chr(34) & vbCrLf & strReg End If End If Next End If strFile = enviro & "\Documents\TrustedFormScriptList-" & CurFolder.NAME & ".txt" Set objFile = objFS.CreateTextFile(strFile, False) If objFile Is Nothing Then MsgBox "Error creating file '" & strFile & "'.", vbOKOnly + vbExclamation _ , "Invalid File" Exit Sub End If With objFile .Write "Windows Registry Editor Version 5.00" & vbCrLf & vbCrLf .Write "[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook\Forms\TrustedFormScriptList]" & vbCrLf .Write strReg End With objFile.Close ' remove dupes ' based on macro at ' https://www.experts-exchange.com/questions/27309860/VbScript-to-remove-Duplicate-rows-from-CSV-File.html#a36545408 Dim tsIn, tsOut, dic, TheLine, Repeat Set dic = CreateObject("Scripting.Dictionary") dic.CompareMode = vbTextCompare 'NOT case sensitive. omit for case sensitive Set tsIn = objFS.OpenTextFile(strFile) Set tsOut = objFS.CreateTextFile(strFile & ".reg") Do Until tsIn.AtEndOfStream TheLine = tsIn.ReadLine If TheLine <> "" Then If dic.Exists(TheLine) Then Repeat = True Else Repeat = False dic.Add TheLine, TheLine End If Else Repeat = False End If If Not Repeat Then tsOut.WriteLine TheLine Loop tsIn.Close tsOut.Close Set tsIn = Nothing Set tsOut = Nothing Set dic = Nothing MsgBox "Done." Set objFS = Nothing Set objFile = Nothing Set objItem = Nothing End Sub
Hi guys, I struggled most of tonight trying to get form control button to work without success. Eventually I gave up. Good news is I think Active X Control Button might do the trick achieving something similar. There are two types of buttons that user can add on a worksheet. Form Control Button (METHOD 1) ActiveX Control Button (METHOD 2) METHOD 1 (Form Control Button) which I tried and could not get to work, and I gave up. ==================================================================== I had a play with Outlook 2019 form VBScript, trying to create some sort of intelligent CommandButton1_Click(). I am using offline 64 bit desktop version Outlook 2019 , on 64 bit Windows 10 . I tried tutorials from these 3 links shown below, and could not get the button to work (as in there is a button; the button is clickable from inside Outllook 2019 Appointment form, but does nothing). https://stackoverflow.com/questions/54329511/how-do-i-hook-into-a-button-click-event-on-a-custom-form https://www.slipstick.com/developer/custom-form/create-hyperlink-outlook-form/ https://www.slipstick.com/outlook/custom-form-security/ I applied Diane's registry hacks and unforunately still the VBScript would not run on clicking the CommandButton1. METHOD 2 (Active X Control Button) which worked for me ============================================= Apparently there is another way to get a CommandButton1 going. You don't have to trigger from within a form. You… Read more Âğ
I Want to use this medium in appreciating cyber golden hacker , after being ripped off my money,he helped me find my cheating lover he helped me hack her WHATSAPP, GMAIL and kik and i got to know that he was cheating on me, in less than 24 hours he helped me out with everything, cybergoldenhacker is trust worthy and affordable contact him on: cybergoldenhacker at gmail dot com
The office 2013 in which all works fine is at the picture. After KB4475563 even with your registry - crippled. Not working.
Office 2019 first verison, ok, running, Today's version: Crippled.
I believe the same will be valid for 2016.
Hi Diane, I am frustrated. I use customized Forms over 20 years. Some time ago I discovered the registry keys here. I successfully aplied them for the versions of Office where my soluytions stopped working. However. Office 2019. After I install 32-bit EN version of Outlook 1812 Build 11126.20188 Click To Run, everything still works (of course I have to do the rocket science with all the Registry you describe here). If, however I check File - Account - Office Updates and let him update to the last version..... guess what. It again stops working. regardless registry. I have the same experience in Company notebook with Office 2016 where some KB fix is installed that causes scripts stop working. Regardless registry. I think it is this one: KB4475563. This is a real Hell. Nigtmare. Hours, days spent in hopeless tests anger and despair. I think we shall say bye bye to our solutions in long term. I spent years to grow the solutions and I have to start from scratch but I have no idea which platform to choose now. This one lasted at least 22 years. Now MS Office team does not understand the product. They cripple it with… Read more Âğ
Hi folks. Just finding this as we are finally switching to newer Outlook. Reg keys work fine. The odd thing i see is that when editing the form is that if i so much as open the script editor (View Code), the code no longer works. I have to save, close, re-open to get it working again.
I have added the name of my custom form in the reg keys, and it does work when i first open it!
Any ideas? Thanks!
Oh my God ! People in MS who take care of Outlook must have fallen onto their heads. I am half dead after having found your post here. Good news in bad news. The good one is, registry workaround works. But I will get mad soon. One of the greatest advantages was that VBS worked seamlessly everywhere synced at replicas !! They literally killed this feature. It is against it's nature. I needed 1 hour to understand and implement the registry branches. I curse the one who decided to cripple Outlook this way. Thank you Diane, you saved my life. Is there any power on the earth how to make Outlook back functional without spending a day tweaking? I also used VBScript at the form to generate GUID. I had to spend several hours to arrive at this: https://support.microsoft.com/en-us/help/4036837/run-time-error-70-permission-denied-generate-guid-with-office-vba Oh MY GOD. They recommend to use Visual Basic instead which does not work at the forms. How the he*l can be generating GUID dangerous or unsafe. When I combine it with this hack I arrive at one day hacking my Outlook to work again. Nigtmare. I wonder what they come with the next version.
I have no idea why generating the guid is dangerous, but they have been doing a lot to block obscure exploits, including run a script rules and vbscript controls.
https://support.office.com/en-us/article/VBScript-controls-blocked-in-Office-365-client-applications-8937ad5a-01a1-48d2-8595-910116907876
Diane, thank you for this article! Any indication if MS will deprecate support for VBScript in custom forms at some point?
It's not on the roadmap. They need to maintain backwards compatibility but may eventually disable it - but not for a very long time.
Outlook 2019 form scripting does not work, even with the published registry patches. I have opened a high priority Microsoft support case after proving the malfunction. I have also added a request to the Microsoft uservoice site. Please access the site and vote on that posting to get scripting working again in the new version.
https://outlook.uservoice.com
Roy Glixon
Silver Partner
It's the same codebase as an outlook 365/2016 build from summer, so it should work. I'll see what my support contact knows.