hallo,
i have a query with these fields: "subject", "cc", "Message", "Address".
I'm trying to make access send automatically one email to each recipient (record) just by clicking a button. The emails should be generated by using the information stored in the query.
programmer Luceze gave me this code:
Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef
Set qd = CurrentDb.QueryDefs("YourQueryName"
Set rs = qd.OpenRecordset
Do until rs.EOF
DoCmd.SendObject , , , rs!Address, , RS!Subject, RS!Message
RS.MoveNext
Loop
It actually work almost completely. But I realised that it cut the message after 251 characters. A second problem of this code is that it always requests a confirmation for each email. It's ok when emails are 20, but when are 200....
Does someone has an idea to solve this? thanks
i have a query with these fields: "subject", "cc", "Message", "Address".
I'm trying to make access send automatically one email to each recipient (record) just by clicking a button. The emails should be generated by using the information stored in the query.
programmer Luceze gave me this code:
Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef
Set qd = CurrentDb.QueryDefs("YourQueryName"
Set rs = qd.OpenRecordset
Do until rs.EOF
DoCmd.SendObject , , , rs!Address, , RS!Subject, RS!Message
RS.MoveNext
Loop
It actually work almost completely. But I realised that it cut the message after 251 characters. A second problem of this code is that it always requests a confirmation for each email. It's ok when emails are 20, but when are 200....
Does someone has an idea to solve this? thanks