With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Dim MyDb As DAO.Database Dim MyRS As DAO.Recordset Dim strTo As String Dim strCC As String Dim strBCC As String Dim strMsg As String Dim strSubject As String Set MyDb = CurrentDb Set MyRS = MyDb.OpenRecordset("qryEmail", dbOpenDynaset) 'This is the recordset MyRS.MoveFirst Do strTo = MyRS("Email") 'THIS IS THE EMAIL FIELD strMsg = "Message " 'This is the mail message strSubject = "Subject" 'This is the subject DoCmd.SendObject acReport, "ReportName", acFormatXLS,strTo, strCC, strBCC, strSubject, strMessage,val(0) ' send mail MyRS.MoveNext Loop Until MyRS.EOF MyRS.Close MyDb.Close
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
8 Experts available now in Live!