Stop Warning When Sending Email From Access

StanJx

Registered User.
Local time
Today, 05:00
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
 
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)>
 

Users who are viewing this thread

Back
Top Bottom