I have a list box of all the persons to email: name, email
this code scans the list and sends
Code:
'------------
Public Sub ScanAndEmail()
'------------
Dim vTo, vSubj, vBody, vRpt
Dim vFilePath
dim i as integer
vRpt = "rReport1"
vBody = "body of email"
vSubj = vRpt
vFilePath = "" 'path of the snapshot or XL or PdF
'scan the list box
For i = 0 To lstEAddrs.ListCount - 1
lstEAddrs.itemdata = i
vTo = lstEAddrs.Column(2)
DoCmd.SendObject acSendReport, vRpt, acFormatPDF, vTO, , , vSubj, vBody
Next
End Sub