Stop Warning When Sending Email From Access (1 Viewer)

StanJx

Registered User.
Local time
Today, 19:10
Joined
Apr 5, 2012
Messages
21
Hi I am trying to send an email using the below code via button of my access form. But I am receiving a warning message I have to allow every time I am sending an email. Any idea how to stop that message? :banghead::banghead::banghead:

Would appreciate if you could post up the modified code ASAP...

Code:
Dim mailto As String
    Dim ccto As String
    Dim bccto As String
    mailto = "[EMAIL="Test@test.com"]Test@test.com[/EMAIL]"
    ccto = ""
    bccto = ""
    emailmsg = "Hi" & vbNewLine & vbNewLine & "Please find the report attached"
    mailsub = "Monthly Sales Report"
    
    DoCmd.SendObject acSendNoObject, Null, , mailto, ccto, bccto, mailsub, emailmsg, False
 

missinglinq

AWF VIP
Local time
Today, 09:40
Joined
Jun 20, 2003
Messages
6,423
Never had the occasion to do this sort of thing, and have no idea as to where the warning is coming from...but if it's Access generated, you could try this:

Code:
DoCmd.SetWarnings False
DoCmd.SendObject acSendNoObject, Null, , mailto, ccto, bccto, mailsub, emailmsg, False
DoCmd.SetWarnings True
Linq ;0)>
 

JHB

Have been here a while
Local time
Today, 14:40
Joined
Jun 17, 2012
Messages
7,732
The warning is coming from your E-Mail system.
The link gives some information about it: https://support.microsoft.com/da-dk/kb/884998
You can also Google it: "docmd.sendobject warning message"
 

Users who are viewing this thread

Top Bottom