Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

turn off prompt message with sendobject

Status
Not open for further replies.
Sep 25, 2002
159
US
Hello,

I wrote some code to query a table and send emails to every entry in the email. I would like to set this up to be automated by have my Task Scheduler open up Access, but this prompt that comes up that asks if "I am sure I would like to send the email because it may be a virus". how can i turn this off?
 
Do a google search for outlook object model guard

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I read this but I'm confused becasue it talks a lot about outlook. I don't know where to add the blocker code to my vb code. I tried adding the SecurityManager code and set to false but it throws an error:

Option Compare Database

Sub MySendEmail()

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strEmailAddress As String
Dim strSubject As String
Dim strEMailMsg As String
Dim strWebLink As String

strWebLink = " 'stDocName = "MyReportToAtt"
strSubject = "Overdue Action Items"

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SalActions")
rst.MoveFirst
Do Until rst.EOF
strEMailMsg = rst![Assigned To] & Chr(10) & Chr(10) _
& "Your Issue ID = " & rst![Issue ID] & Chr(10) _
& "Your Commit Date = " & rst![Commit Date] & Chr(10) _
& "Action Items Web Link = " & strWebLink & Chr(10) _
& "Please find attached further instructions" & Chr(10) & Chr(10) _
& "Yours etc etc"

strEmailAddress = rst!

If Not IsNull(strEmailAddress) Then
'EMAIL USER DETAILS & ATT REPORT
DoCmd.SendObject acSendNoObject, , , strEmailAddress, , , strSubject, strEMailMsg, False, False

End If

rst.MoveNext
Loop
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing

End Sub
 
dharkangel...

Are you using Outlook Express?
I had the same issue.
If so try this.

Open Outlook Express, Choose Tools, Options
Click the Security Tab, Un-Check --- Warn me when other applications try to send mail as me.

I don't use Outlook, but I'm sure the same security settings are buried in there as well.

Hope this helps...

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
Thank you for the tip, I will try this. I have since been using the CDO object to send emails through an SMTP server to bypass this problem.
 
It could be your Macro security setting as well.

If its Outlook, you may need to change your Macro security settings to low...

I also found this link while searching the Outlook Object Model....


It's very cheap, and fixes the issue of disabling your security settings. It answers the popup message, and can be run from your code.

Good Luck

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
dharkangel,

Unless it has been too long, since I looked through the FAQ, there isn't a how to use CDO to send a message. If you wouldn't mind posting one and putting a link here, it would be most appreciated. I never took the time to read up on CDO.

You are right, the object model guard only provides a means to automate an Outlook equivalent object model programmatically.

docmd.senobject is so efficient, it is a pity Microsoft had to break it without adding support for application signing to enable it without prompts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top