Send email SNP files?

J

JT

I have 200 records in my table ‘tblLetters’ (ContactName, ShippedDate and
ContactEmail columns) and I have one report ‘rptLetter’. The ContactName and
ShippedDate columns populates in the report.
Sense I have 200 records. I need to create 200 SNP files and OutputTo to c:\
drive.
Here is the code;
THIS CODE WILL SEND ONE AT THE TIME. HOW CAN I CREATE ALL FILES BY CLICKING
ONCE AND POPULATING EACH RECORD FROM THE TABLE TO EACH SNP FILE AND SEND
EMAILS WITH ATTACHED SNP FILES TO THEIR OWN EMAIL ADDRESS (ContactEmail
columns)?????

Private Sub Command2_Click()
On Error GoTo Err_Command2_Click

Dim stDocName As String
Dim stFileNm As String
stDocName = "rpt_Letter"
stFileNm = "C:\ Letters\1.snp"
DoCmd.OutputTo acReport, stDocName, acFormatSNP, stFileNm, False

Exit_Command2_Click:
Exit Sub

Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click

End Sub
 
Top