T
TJS
I'm trying to create a Bcc list of 400 people instead of sending 400
individual emails. If I comment out the "DoCmd.SendObject...." I will
get a runtime error 3701 on the ".MoveNext" command. Makes NO sense to
me! Help?
Public Function SendNewsletter()
Dim MyDb As DAO.Database
Dim MySet As DAO.Recordset
Dim email As String
Set MyDb = CurrentDb()
Set MySet = MyDb.OpenRecordset("qryNewsletterEmails", dbOpenDynaset)
With MySet
Do Until .EOF
email = email & MySet! & ";"
' remove the next line causes a runtime error on .MoveNext
DoCmd.SendObject .... etc ' <editted for length>
.MoveNext
Loop
End With
' want to move the DoCmd here
MySet.Close
MyDb.Close
End Function
individual emails. If I comment out the "DoCmd.SendObject...." I will
get a runtime error 3701 on the ".MoveNext" command. Makes NO sense to
me! Help?
Public Function SendNewsletter()
Dim MyDb As DAO.Database
Dim MySet As DAO.Recordset
Dim email As String
Set MyDb = CurrentDb()
Set MySet = MyDb.OpenRecordset("qryNewsletterEmails", dbOpenDynaset)
With MySet
Do Until .EOF
email = email & MySet! & ";"
' remove the next line causes a runtime error on .MoveNext
DoCmd.SendObject .... etc ' <editted for length>
.MoveNext
Loop
End With
' want to move the DoCmd here
MySet.Close
MyDb.Close
End Function