ok, this code below is working but it does not show a pop up from outlook instead it sends the mail automatically.
I want to have a pop up as a new email message with the to list populated from the query when i click the button on the form. anyone can help?
I want to have a pop up as a new email message with the to list populated from the query when i click the button on the form. anyone can help?
Code:
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim strEmailAddress
Set MyDb = CurrentDb()
Set rsEmail = MyDb.OpenRecordset("Query Full Director", dbOpenSnapshot)
Do Until rsEmail.EOF
strEmailAddress = strEmailAddress & rsEmail("Email") & ";"
rsEmail.MoveNext
Loop
strEmailAddress = Left(strEmailAddress, Len(strEmailAddress) - 1)
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , strSubject, strEMailMsg, False, False
rsEmail.Close
Set rst = Nothing
Last edited: