What is best way to turn off security messages when using SendObject in Access 2016
Posted on 2016-11-06
I am using the SendObject method of MS Access 2016 to send email by placing the following code in an onclick event.
DoCmd.SendObject , , acFormatTXT, strTo, , , strSubject, "test", False
When using this method a Microsoft security message advises that a program is attempting to send an email which requires clicking a button to send the email.
What is the best way to avoid this error? Note that I send emails which are text based, but I also need to send xls files generated from querries.