I am trying to find some suitable code to place text from a report, query or table in the body of an email where each new record is a new line in the email
Somewhere in the process of writing to your CDO email object, you run into "Textbody", and it is at that point you want to write your record values out to string variables, and then you use the string variables to concantenate your text body like so:
The vbcrlf constant pushes the cursor to a newline in the textbody, so you want to make sure you add it whereever you want a record to end. If you need it in nice neat table format, you will have to pad your data with spaces or you will need to go to much more complex code that writes the table out to the clipboard and then to the .Textbody
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.