Can anyone help. I have used code from this forum shown below:
The problem is I am getting this error:
"Unknown message recipient(s); the message was not sent"
Anyone got any ideas?
Code:
On Error GoTo Err_Command68_Click
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strEmail As String
Set cn = CurrentProject.Connection
Set rs = New ADODB.Recordset
rs.Open "EmailListTable", cn
With rs
Do While Not .EOF
strEmail = strEmail & .Fields("EmailAddress") & ";"
.MoveNext
Loop
.Close
End With
strEmail = Left(strEmail, Len(strEmail) - 1)
DoCmd.SendObject , , , strEmail, , , "Intranet", , True, ""
Exit_Command68_Click:
Exit Sub
Err_Command68_Click:
MsgBox Err.Description
Resume Exit_Command68_Click
End Sub
The problem is I am getting this error:
"Unknown message recipient(s); the message was not sent"
Anyone got any ideas?
Last edited by a moderator: