Stefano larmelina
Member
- 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
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