(1) I have tested the codes output of the "rcpts" field, and counted it as well - OK
(2) I've removed the "rcpts" field from the bcc option of the SendObject tag - OK
(3) I tried inserting the DoCmd.SendObject line into the loop and used the .Field("EmailName") as bcc - it worked OK
I need a single blank email, with all the rcpts addresses in the bcc field.
The code works great, until I insert the rcpts name in the bcc option. Am I using the wrong syntax to call the rcpts into the SendObject tag? Or is there a limit to the size of the bcc field for the SendObject tag? Please Help!
Thanks
Expand|Select|Wrap|Line Numbers
- Dim db As DAO.Database
- Dim rst As DAO.Recordset
- Dim rcpts As String
- Dim rcptscount As Integer
- Set db = CurrentDb
- Set rst = db.OpenRecordset("EmailInfo")
- rcpts = ""
- rcptscount = "0"
- With rst
- .MoveFirst
- Do Until .EOF
- rcpts = rcpts & .Fields("EmailName") & ";"
- rcptscount = rcptscount + 1
- .MoveNext
- Loop
- End With
- Debug.Print rcpts
- Debug.Print rcptscount
- DoCmd.SendObject , , , "email@server.com", , rcpts, "Subject Text Here", "Message Text Inserted Right Here - Or Leave Blank", True
- rst.Close