Outlook Custom Form Scripting only working when clicking on "Run this form"

Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
So, I just added a new basic code to my custom form (using "show code"), and when I try to run the form through the "Run this form" button, the code works just fine (a simple MsgBox when pressing a button).

The issue is why I try to run the form through VBA and then pressing on the same button. Basically, the form opens just fine, but any of the codes does work.

I've went on options, and checked the "allow scripting on shared folders" and "allow scripting on public folder" boxes and that did not work as well. I also created the keys that disable custom form scripting.

The VBA code I'm using to open the custom form:
Public Sub AddMyForm()
Dim Items As Outlook.Items
Dim Item As Object
Set Items = Application.ActiveExplorer.CurrentFolder.Items
Set Item = Items.Add("ipm.task.test")
Item.Display
End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You added all of the necessary keys? You need ot enable it and also add a key for the form.

Same bitness:
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)


32-bit office/64-bit windows:
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)



 
Thread starter Similar threads Forum Replies Date
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
Z Outlook Custom Form: Adding Dropdown(Project Code) at the end of subject Outlook VBA and Custom Forms 0
D create an html table in outlook custom form 2010 using vba in MsAccess Outlook VBA and Custom Forms 7
Potty Ash MS Outlook 2010 custom form - validation or formula to request user to check a checkbox Outlook VBA and Custom Forms 16
L Outlook Custom Form Using Outlook 2
Diane Poremsky The custom form cannot be opened. Outlook will use an Outlook form instead. New Slipstick.com Articles 0
J Can Click to Drag Custom Form Field But Cannot Drop When Designing in Outlook 2007 Outlook VBA and Custom Forms 2
G Adding a contact to Outlook with a custom form using Access VBA Outlook VBA and Custom Forms 1
A From box in custom outlook Form Outlook VBA and Custom Forms 0
L Outlook 2007 Custom Form and Toolbar Not Working Using Outlook 5
C Outlook Custom Contact Form Attach Files in new notes fields Outlook VBA and Custom Forms 3
J Outlook 2010: can't forward appointment on custom form Using Outlook 1
S Custom Outlook Form 2013 Displaying fields incorrectly Outlook VBA and Custom Forms 1
E Create a URL hyperlink in an Outlook custom form? Outlook VBA and Custom Forms 2
R Outlook Custom form check if there an attachment Outlook VBA and Custom Forms 2
M Outlook 2013 won't convert Excel contacts into Outlook contacts using my custom form Using Outlook 3
G Custom Form code not working - Outlook 2010 Outlook VBA and Custom Forms 2
P Outlook 2010 custom form olk control font size increases everytime form is published Outlook VBA and Custom Forms 1
Z outlook 2007 - opening a contact from the search results doesn't use the custom form Using Outlook 10
R Static Resources in Custom Outlook Appointment Form Using Outlook 2
S Outlook Custom form - selecting text in read page Using Outlook 0
H Custom Contact form not working in Outlook 2003 Using Outlook 3
H Custom Outlook Contact form Using Outlook 1
C Set reminder time in custom form (Outlook 2010) Using Outlook 1
N Custom Outlook Form Using Outlook 1
S Desperate for Help with Outlook custom form Using Outlook 0
C Custom Form Outlook 2010 Contacts Using Outlook 3
H How can you add a URL field in a Outlook Custom Contact form? Using Outlook 6
C Outlook 2010 Custom Form Issues Using Outlook 2
D Outlook 2007 Custom Form - Dual Addresses and Mailing Address Using Outlook 6
M Outlook custom form question Using Outlook 4
B Can't locate in Outlook custom form where is message from Using Outlook 4
M Outlook 2010 Custom Form Problem Using Outlook 1
B Date validation in Outlook Custom Form Using Outlook 2
B Outlook 2010 popup "A custom form can not be opened. Outlook will use an Outlook form instead. The Using Outlook 2
C Trying to make a simple custom outlook form Using Outlook 2
T Outlook Custom Form Using Outlook 3
R Use a custom form in outlook 2007 Using Outlook 1
H Outlook E-Mail Custom Form Using Outlook 3
A How to show newly created extended properties using EWS Managed API in my outlook custom form contac Using Outlook 1
P printing custom form with outlook 2010 Using Outlook 9
A create a custom contact form in Outlook. It used to be available from the Tools menu but can't find it in 2010 Using Outlook 1
P custom form failed to open on outlook 2010 Using Outlook 2
A Custom form - hitting 'next item' button hangs Outlook Outlook VBA and Custom Forms 2
L Macros disabled in custom Outlook form Outlook VBA and Custom Forms 1
J populate word template from Outlook custom form Outlook VBA and Custom Forms 2
J Outlook custom form - VBS call VBA macro Outlook VBA and Custom Forms 3
K Can't use links in Outlook custom form text field Outlook VBA and Custom Forms 1
D Outlook 2003 custom form not viewable by receiver Outlook VBA and Custom Forms 11
Similar threads


















































Top