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

Status
Not open for further replies.
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
 
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)



 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
G Add Map It button to Custom Contacts Form in Outlook Outlook VBA and Custom Forms 1
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
cbufacchi Outlook 365 Populate custom Outlook Appoint form Outlook VBA and Custom Forms 2
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
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. Using Outlook 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
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
L Custom Form (Outlook 2003 and Exchange 2003) Outlook VBA and Custom Forms 6
N Custom Contact Form in Outlook 2003 Outlook VBA and Custom Forms 1
B Importing Contacts Does Not Use Defined Custom Form in Outlook 2007 Outlook VBA and Custom Forms 1
L wrong icon displayed for outlook custom form Outlook VBA and Custom Forms 8

Similar threads

Back
Top