Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now
Dim MyDB As DAO.Database Dim rst As DAO.Recordset Set MyDB = CurrentDb Set rst = MyDB.OpenRecordset("Query_FOR_HTML") With rst Do While Not .EOF Mailbody = Mailbody & ![RBP_MASTER_ID] & " | " & ![Sku] & " | " & ![Qty] & " | " & ![TARGET_PRICE] & vbCrLf .MoveNext Loop End With Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Dim strPath As String Dim strFileName As String Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) With MailOutLook .BodyFormat = olFormatRichText .To = "email@example.com" '.CC = "" '.bcc = "" .Subject = "Testing" & Date .Body = "UK Backorder Report " & vbCrLf & " " & vbCrLf & Mailbody .Send End With rst.Close Set rst = Nothing MsgBox "done"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Fields don't match on a query||9||47|
|Multiple tables for a tabbed form||2||34|
|Button to auto fill form with previous record||3||21|
|My database crashes ever time I try to create a macro.||8||9|
Join the community of 500,000 technology professionals and ask your questions.