By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Sending emails from Access without Outlook Warnings

P: 30
Hi,

I send out emails through MS Access via SendObject. I would like to know if there is a way of getting rid of the Outlook Security Popup that comes up every time an email is about to be sent.

I have tried Advanced Security For Outlook but it does not seem to popup when sending emails, Iíve used it before for synchronization with my mobile, and it seemed to popup then.

Any help would be greatly appreciated
Jun 6 '07 #1
Share this Question
Share on Google+
7 Replies


maxamis4
Expert 100+
P: 295
with the outlook object add this piece to it

Expand|Select|Wrap|Line Numbers
  1. .DisplayAlerts = False
  2.  
Jun 6 '07 #2

P: 30
with the outlook object add this piece to it

Expand|Select|Wrap|Line Numbers
  1. .DisplayAlerts = False
  2.  
I use
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject
to send out emails

Where exactly do I place that piece of code?

I know
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SetWarnings False
is used before SQL statements, but where would i use the other one?
Jun 6 '07 #3

maxamis4
Expert 100+
P: 295
Could you post your entire module please. Its not the sql its in the actual outlook object piece.
Jun 6 '07 #4

Expert 100+
P: 218
Hi,

If this is what I think it is, then no amount of VBA coding will stop the popup message from Outlook. Recent versions of Outlook have enhanced security which is meant to stop spam being sent from external apps.

The warning usually says something like "a 3rd party app is trying to send a message ..."

The only way to get rid of the popup warning is to either click the OK button, or run a small app which willl do this for you automatically (there are one or two which are widely available - Google "Outlook security warning")

Hope this is of some assistance
Jun 6 '07 #5

P: 30
Could you post your entire module please. Its not the sql its in the actual outlook object piece.
Expand|Select|Wrap|Line Numbers
  1. Dim dbs As DAO.Database
  2.     Dim rst As DAO.Recordset
  3.  
  4.     Set dbs = CurrentDb
  5.     Set rst = dbs.OpenRecordset("Email - Purchase - Incompleted Due Followups")
  6.  
  7.     Dim intCount As Integer
  8.  
  9.     intCount = DCount("[FullName]", "[Email - Purchase - Incompleted Due Followups]")
  10.  
  11.     If intCount = 0 Then
  12.         MsgBox ("There are no followups to email"), vbInformation
  13.         Exit Sub
  14.     Else
  15.         rst.MoveFirst
  16.         Do Until rst.EOF
  17.  
  18.         tempBodyField = mainBodyField
  19.         tempSubjectField = mainSubjectField
  20.         strEmailAddress = rst![email]
  21.         FollowupDate = rst![FollowupDate]
  22.         FollowupDate = DateAdd("m", 3, todaysDate)
  23.  
  24.         tempBodyField = Replace(tempBodyField, "<cname>", rst![FullName])
  25.         tempBodyField = Replace(tempBodyField, "<purchase>", rst![Product])
  26.         tempBodyField = Replace(tempBodyField, "<date>", todaysDate)
  27.         tempBodyField = Replace(tempBodyField, "<pdate>", rst![PurchaseDate])
  28.  
  29.         tempSubjectField = Replace(tempSubjectField, "<cname>", rst![FullName])
  30.         tempSubjectField = Replace(tempSubjectField, "<purchase>", rst![Product])
  31.         tempSubjectField = Replace(tempSubjectField, "<date>", todaysDate)
  32.         tempSubjectField = Replace(tempSubjectField, "<pdate>", rst![PurchaseDate])
  33.  
  34.         DoCmd.SendObject , , , strEmailAddress, _
  35.                           , , tempSubjectField, tempBodyField, False, False
  36.  
  37.         DoCmd.SetWarnings False
  38.         DoCmd.RunSQL "UPDATE Followup " & _
  39.                      " SET Followup.FollowupDate = '" & FollowupDate & "', Followup.EmailSentDate = '" & todaysDate & "', Followup.Completed = 'Yes'" & _
  40.                      " WHERE (((Followup.ID) = " & rst![ID] & "))"
  41.  
  42.         DoCmd.SetWarnings True
  43.  
  44.         rst.MoveNext
  45.         Loop
  46.  
  47.         rst.Close
  48.         Set rst = Nothing
  49.         dbs.Close
  50.         Set dbs = Nothing
  51.  
  52.         MsgBox intCount & " followups have been sent out" _
  53.                + Chr(13) + Chr(13) + "A new followup date for these purchases" & _
  54.                Chr(13) + "has been set to " & FollowupDate, vbInformation
  55.         DoCmd.RunCommand (acCmdCloseWindow)
  56.     End If
  57.  
Jun 7 '07 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
It can be turned off in Outlook
Jun 13 '07 #7

akabir77
P: 5
can you tell me where in outlook can we trun this off? i have the same problem...
Aug 29 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.