Send E-mail from Query Results (1 Viewer)

pbaldy

Wino Moderator
Staff member
Local time
Today, 13:21
Joined
Aug 30, 2003
Messages
36,133
No problem.
 

Mark_

Longboard on the internet
Local time
Today, 13:21
Joined
Sep 12, 2017
Messages
2,111
Hayes8052,

Your code was MOSTLY right... just need to move
Code:
                sSubject = "The Following Contracts are going to expire in the next 30 days: "
                sMessageBody = "The Following Contracts are going to expire in the next 30 days." & vbCrLf & "Please initiate the Addendum Process" & vbCrLf & _
                    "Contract No: " & .Fields(0) & vbCr & vbCrLf & _
                    "Project Name: " & .Fields(1) & vbCr & _
                    "Company: " & .Fields(2) & vbCr & vbCr & _
                    "Regards" & vbCrLf & "Contract Management Team"
 
                DoCmd.SendObject acSendNoObject, , , _
                    sToName, , , sSubject, sMessageBody, False, False

AFTER the end of the
Code:
Loop

Inside you send once per recipient to that person and EVERYONE before. Similar to a chain letter. AFTER the loop you've only a list of Email addresses put together that you are sending to.
 

Users who are viewing this thread

Top Bottom