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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top