VBScript doesn't run on Recipient Email

BinCooker

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Hello all,

I'm new to this forum. Any help is greatly appreciated.

I am trying to create a VBScript for custom forms in Outlook 2016. I have a Command Button created in the form, and the test code associated with it is shown below.

Function CommandButton1_Click
MsgBox "Hello"
End Function

I have no problem running this code in "Run This Form", but after I try to send this email to myself, I click on the button but there was nothing happened. It seems like the code was not executed when I press the button. Could you please tell me where I went wrong? Thank you.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
after I try to send this email to myself, I click on the button but there was nothing happened. It seems like the code was not executed
That is correct - the script is disabled in received mail for security reasons - plus you need to send the forms definition with it.

It should work in an exchange environment if you use an orgs form library.
 

BinCooker

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Thank you for your prompt response, Diane. It makes sense that the script should be disabled for security reasons.
 
Similar threads
Thread starter Title Forum Replies Date
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
M Forward Appointment as BCC with VBScript Outlook VBA and Custom Forms 7
D Security patch seems to kill vbscript on Enterprise Level Outlook VBA and Custom Forms 4
R VBScript Commands Outlook VBA and Custom Forms 2
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 5
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 0
S my vbscript button1_click code works on appointment created but not on opening an existing apntmn Outlook VBA and Custom Forms 16
JorgeDario Template oft that contains VBScript Is not running Using Outlook 1
J Outlook 2010 VBScript editor does not run code at all Outlook VBA and Custom Forms 0
T Create new item in public folder using VBscript Outlook VBA and Custom Forms 1
R VBScript Sendmail not selecting correct 'from' address Outlook VBA and Custom Forms 3
B Recommended Outlook & VBScript Books? Outlook VBA and Custom Forms 3
Mary B VBscript: Need to copy every email to a folder & mark that copy as read Outlook VBA and Custom Forms 5
K VBScript Outlook, add attachment Outlook VBA and Custom Forms 1
S VBA Macro to VBScript Outlook VBA and Custom Forms 1
E VBScript to replace module? Using Outlook 3
F VBScript to add pre defined text Using Outlook 5
D Custom form and VBScript Using Outlook 5
F VBScript copy contacts and remove duplicates Using Outlook 1
R VBA Macro to VBScript in a form- Help Please! Using Outlook 10
H Accessing a control on a frame in Outlook with VBScript Outlook VBA and Custom Forms 1
Y Creating a Task with VBScript Outlook VBA and Custom Forms 14
N VBScript does not run in Outlook 2003 Outlook VBA and Custom Forms 4
R Follow up button doesn't working neither the reminders in BCM BCM (Business Contact Manager) 0
Terry Sullivan Sender's Name Doesn't Appear in the From Field on Outlook 365/IMAP Using Outlook 2
P Outlook Mobile App Doesn't Refresh Inbox Using Outlook 0
DoctorJellybean Outlook 365 doesn't always mark emails as read Using Outlook 3
GregS Simple calendar sharing doesn't work Using Outlook 6
G Calendar View in Outlook Office 365 - Doesn't show enough hours, and the 30/60 min choice isn't the solution Using Outlook 4
P Desktop doesn't index Outlook IMAP files, laptop Outlook does index those same IMAP files Using Outlook 2
B Outlook rule run a Script doesn't work Outlook VBA and Custom Forms 1
E Accessing shared outlook folder doesn't work since switch to new outlook/excel Outlook VBA and Custom Forms 11
H VB script in outlook form doesn't work anymore Outlook VBA and Custom Forms 2
J Junk mail doesn't work Using Outlook 3
J Custom form code doesn't run Outlook VBA and Custom Forms 2
Laurent Duchastel New email setup dialog doesn't allow alias Using Outlook 2
M Item edits doesn't always sync Using Outlook 11
C scanpst.exe doesn't repair .pst file Using Outlook 1
Caio "From" field doesn't show extra email addresses in Outlook 2016. Using Outlook.com accounts in Outlook 6
O Worksheet doesn't show on jumplist Using Outlook 1
C Outlook 2016 doesn't show contacts in address book Using Outlook 2
Vijay Run script doesn't work in outlook Using Outlook 1
Diane Poremsky Category Color doesn't Display in Inbox New Slipstick.com Articles 0
S Outlook 2013 doesn't download html messages Using Outlook 0
L Run a Script Rule doesn't work Using Outlook 5
M Google Apps Mail *SENT* from iPhone doesn't download to Outlook via POP3 Using Outlook 1
M Marco doesn't show up when using Alt-F8 Outlook VBA and Custom Forms 2
P AutoForward Randomly Doesn't fwd emails Using Outlook 3
Diane Poremsky Receive a Reminder When a Message Doesn't Arrive? New Slipstick.com Articles 10
K Macro doesn't recognize local mails from colleagues Outlook VBA and Custom Forms 2

Similar threads

Top