109bow
Registered User.
- Local time
- Today, 22:47
- Joined
- Oct 24, 2007
- Messages
- 141
I have a query which I need to email in an excel format to a changing list of recipients. The recipients are held in a query "email_lastturndata_qry" using the field "email_address" for the recipient email addresses.
I have this code so far,
Private Sub emailpostturndiameters_Click()
DoCmd.OpenQuery "email_lastturndata_qry", , acReadOnly
DoCmd.SendObject acSendQuery, "post_turn_wheeldiameters", acFormatXLS, "", , , "Post turn wheel diameters", "Attached are the post turn wheel diameters for 110**+110** (amend as required)", True
DoCmd.close acQuery, "email_lastturndata_qry"
End Sub
Is it possible to add the email_address field as the To part of the email?
I'm still trying to get my head round VBA so any help much appreciated.
Many thanks
I have this code so far,
Private Sub emailpostturndiameters_Click()
DoCmd.OpenQuery "email_lastturndata_qry", , acReadOnly
DoCmd.SendObject acSendQuery, "post_turn_wheeldiameters", acFormatXLS, "", , , "Post turn wheel diameters", "Attached are the post turn wheel diameters for 110**+110** (amend as required)", True
DoCmd.close acQuery, "email_lastturndata_qry"
End Sub
Is it possible to add the email_address field as the To part of the email?
I'm still trying to get my head round VBA so any help much appreciated.
Many thanks