List of mails separated with ,

Worth reading the above article for pitfalls etc but if its a quick output then ...

Code:
Dim rstMails As DAO.Recordset
Dim strMails As String
  
Set rstMails = CurrentDb.OpenRecordset("select * from [2015] order by email asc") 'order your mail

 With rstMails
     Do Until .EOF
    
            strMails = strMails & !email & ","
                 
      .MoveNext
    Loop
 End With
 
Debug.Print Left(strMails, Len(strMails) - 1)
 

Users who are viewing this thread

Back
Top Bottom