VBScript doesn't run on Recipient Email

Status
Not open for further replies.

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.
 
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.
 
Thank you for your prompt response, Diane. It makes sense that the script should be disabled for security reasons.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A VBscript stops running after updating form Outlook VBA and Custom Forms 1
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
G Outlook 365 My iCloud Outlook doesn’t work after reinstalling Microsoft365 on Windows 10 PC – now I get error message on contacts and calendar Using Outlook 1
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
M Shift Delete doesn't delete email from server Using Outlook 3
C Outlook doesn't feel reliable, anymore Using Outlook 5
C View doesn't refresh (fields or formatting) Using Outlook 1
J search doesn't find anything Using Outlook 1
gproston Why doesn't Outlook remember indexing? Using Outlook 1
R Why doesn't outlook use "Normal" style for new messages? Using Outlook 4
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
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

Similar threads

Back
Top