pcalabria
asked on
What is best way to turn off security messages when using SendObject in Access 2016
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.
Thanks
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.
Thanks
try using Outlook Redemption
or this one vbMapi
ASKER
Thanks Rey, I was hoping to find a solution that works with the SendObject method built into Access 2016 and that I would not need to replace SendObject with new code.
Do you, or does anyone, know of a way to turn the messages off in Access 2016, or a way to add code that turns off the messages?
Thanks
Do you, or does anyone, know of a way to turn the messages off in Access 2016, or a way to add code that turns off the messages?
Thanks
you can try this Click Yes
For sending emails through Access for years i am using the CDO solution...It has no nags what so ever except when it is unsuccessful and it allow everything needed
Check this post here
Check this post here
I have seen CDO used and inherited some VB Script that uses it, but I generally use vbMAPI when working in Access.
ASKER
I need to be able to email reports and queries, as you can do with the SndObject method.
Does anyone know if the CDOSYS.dll works with windows eight and windows ten?
Does anyone know if the CDOSYS.dll works with windows eight and windows ten?
did you check the Click Yes ?
ASKER
Rey, I have tried clickyes in the past, and the problem I remember was performance, but it did work. My workstations have very slow hard drives.
I'm interested in CDO because I've been using CDO for that past 15 years in this application, but when I upgraded to Access 2016 the reference showed up as MISSING.
If I can get CDO working I may not need to change any other code.
I'm interested in CDO because I've been using CDO for that past 15 years in this application, but when I upgraded to Access 2016 the reference showed up as MISSING.
If I can get CDO working I may not need to change any other code.
@pcalabria,
it would have been nice if you posted those information in your original post.
we would have not bothered offering you other options.
anyway, try this sample from my friend Leo
http://www.accessmvp.com/thedbguy/demos/cdoemail.asp
it would have been nice if you posted those information in your original post.
we would have not bothered offering you other options.
anyway, try this sample from my friend Leo
http://www.accessmvp.com/thedbguy/demos/cdoemail.asp
vbMAPI gets my vote. It's easy to use and is VERY simple to deploy (since there is nothing to deploy, everything needed is in the modules you include in your VBA code).
Beginning with Exchange 2007 (and compatible versions of Office), CDO was no longer deployed. Of course, many programs will install the libraries, but if you want to use CDO you MUST ensure your target platform has those libraries (and all it's dependencies) installed and configured properly. For my money (and time), it's just not worth the trouble when you can buy vbMAPI for 102 USD.
Beginning with Exchange 2007 (and compatible versions of Office), CDO was no longer deployed. Of course, many programs will install the libraries, but if you want to use CDO you MUST ensure your target platform has those libraries (and all it's dependencies) installed and configured properly. For my money (and time), it's just not worth the trouble when you can buy vbMAPI for 102 USD.
ASKER
I'm sorry for the confusion, perhaps I oversimplified.
I have a mature MS-2000 application running on XP machines. I am trying to get this app to run on a Windows 10 machine
running Access 2016.
When I attempted to load the program file I received the following message:
Your Microsoft access database contains a missing or broken reference to the CDO.DLL version 1.21 pop up
Next, I held the shift key and started and moved directly to the code. In the references section I found:
MISSING CDO 1.21 Library
Below the reference table I was able to find a path to the missing file, which is:
CDO.DLL
Upon doing research (as per Scotts message above), I became very confused as it seems a though I would need another approach to send emails.
My code to send email includes more than 100 routines which needs to:
send text and html emails
be capable of attaching multiple files
multiple To:, CC:, and BCC addresses
Attach MS Access Queries
Attach MS Access Reports
Support a Pause to review option before sending
First, I first tried using the Docmd.SendObject built into acc2016 and this solved some of the problems, except that I can not get rid of the security messages.
Second I wrote code to use the Outlook Object Module, and was very successful sending emails. I was even able to turn off the security messages, however I could not figure out how to send Native Access queries and reports.
So Third, I went back to the Docmd.SendObject code hoping I would find a way to turn off the messages, as I successfully did with the outlook object module.
Rey quickly suggested Click Yes, Outlook Redemption, and VbMapi which all have possibilities, but I believe my problem would be more simply solved if I can just turn off those darn messages.
I found a couple articles on the web about tricking the DoCmd.SendObject command to surpress the message, and another selling a com file that they claim you can install and it will turn off the message, but I don't know anything about them or their sources, so I wanted t come back there to see what you guys suggest. Many of you like Rey, Dale, and Scott, have helped me time and time again for many years. This is my "safe place" for finding new code and solutions.
So what's the consensus? The code using the OOM does most of what I want but does not allow me to send tables and queries. Is using SendObject the best, or should I scrap all of it at use vbMapi?
Thanks all
I have a mature MS-2000 application running on XP machines. I am trying to get this app to run on a Windows 10 machine
running Access 2016.
When I attempted to load the program file I received the following message:
Your Microsoft access database contains a missing or broken reference to the CDO.DLL version 1.21 pop up
Next, I held the shift key and started and moved directly to the code. In the references section I found:
MISSING CDO 1.21 Library
Below the reference table I was able to find a path to the missing file, which is:
CDO.DLL
Upon doing research (as per Scotts message above), I became very confused as it seems a though I would need another approach to send emails.
My code to send email includes more than 100 routines which needs to:
send text and html emails
be capable of attaching multiple files
multiple To:, CC:, and BCC addresses
Attach MS Access Queries
Attach MS Access Reports
Support a Pause to review option before sending
First, I first tried using the Docmd.SendObject built into acc2016 and this solved some of the problems, except that I can not get rid of the security messages.
Second I wrote code to use the Outlook Object Module, and was very successful sending emails. I was even able to turn off the security messages, however I could not figure out how to send Native Access queries and reports.
So Third, I went back to the Docmd.SendObject code hoping I would find a way to turn off the messages, as I successfully did with the outlook object module.
Rey quickly suggested Click Yes, Outlook Redemption, and VbMapi which all have possibilities, but I believe my problem would be more simply solved if I can just turn off those darn messages.
I found a couple articles on the web about tricking the DoCmd.SendObject command to surpress the message, and another selling a com file that they claim you can install and it will turn off the message, but I don't know anything about them or their sources, so I wanted t come back there to see what you guys suggest. Many of you like Rey, Dale, and Scott, have helped me time and time again for many years. This is my "safe place" for finding new code and solutions.
So what's the consensus? The code using the OOM does most of what I want but does not allow me to send tables and queries. Is using SendObject the best, or should I scrap all of it at use vbMapi?
Thanks all
<<I was hoping to find a solution that works with the SendObject method built into Access 2016 and that I would not need to replace SendObject with new code.
Do you, or does anyone, know of a way to turn the messages off in Access 2016, or a way to add code that turns off the messages?>>
just to add my .02 cents and to answer the specific question, no, there is nothing in Access that will do this. That's the way Outlook's object model security works.
You have two basic choices:
1. Use another method such as BLAT, CDO or vbSendMail (all free). But with all, there is install issues to consider.
2. Use a 3rd party tool as has been said, such as redemption, click yes, or vbMapi.
For years, I used vbSendMail, but switched to vbMapi. Allowed me to do much more with Outlook.
That's about it. This is just a recap of everything that has already been said (and another vote for vbMapi) so no points here please.
Jim.
Do you, or does anyone, know of a way to turn the messages off in Access 2016, or a way to add code that turns off the messages?>>
just to add my .02 cents and to answer the specific question, no, there is nothing in Access that will do this. That's the way Outlook's object model security works.
You have two basic choices:
1. Use another method such as BLAT, CDO or vbSendMail (all free). But with all, there is install issues to consider.
2. Use a 3rd party tool as has been said, such as redemption, click yes, or vbMapi.
For years, I used vbSendMail, but switched to vbMapi. Allowed me to do much more with Outlook.
That's about it. This is just a recap of everything that has already been said (and another vote for vbMapi) so no points here please.
Jim.
<<but I believe my problem would be more simply solved if I can just turn off those darn messages.>>
You can't.
<< Is using SendObject the best, or should I scrap all of it at use vbMapi?>>
I'd use vbMapi It's the simplest of all of them, and I believe the cheapest as well.
Jim.
You can't.
<< Is using SendObject the best, or should I scrap all of it at use vbMapi?>>
I'd use vbMapi It's the simplest of all of them, and I believe the cheapest as well.
Jim.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks everyone.
I would up writing a sub program using the Outlook Object Module to send emails. It was pretty easy to turn off the security warnings by starting outlook in administrator mode.
The problem was that I could not send reports and queries directly with the OOM. Scott, you gave me the idea to integrate code to attach a the objects in my subroutine, but I was spinning my wheels until Dale mentioned the OutputTo method, which I had not used before.
I still have some issues, but for the most part I was able to work most of them through.
Thanks again, you guys are awesome!
I would up writing a sub program using the Outlook Object Module to send emails. It was pretty easy to turn off the security warnings by starting outlook in administrator mode.
The problem was that I could not send reports and queries directly with the OOM. Scott, you gave me the idea to integrate code to attach a the objects in my subroutine, but I was spinning my wheels until Dale mentioned the OutputTo method, which I had not used before.
I still have some issues, but for the most part I was able to work most of them through.
Thanks again, you guys are awesome!