Exporting a Report or Query as a CSV File into an E-Mail as an Attachment

  • Thread starter DoctorV3774 via AccessMonster.com
  • Start date
D

DoctorV3774 via AccessMonster.com

I have this line of code in a module

DoCmd.SendObject acReport, "Rpt_ACH-Test", "MS-DOSText(*.txt)",
"(e-mail address removed)", "", "", "Today's ACH File", "Please check the file!!!",
False, ""

It send the file fine as a Fixed width file. Later on in the module I am
saving the query as a CSV file to a specified path

DoCmd.TransferText acExportDelim, , "Qry_Report_by_Rep_Date-Export",
strpathText, False, ""

What I was hoping to do was to send the report as a CSV File, or attach the
query saved as strPathText in the e-mail.

How can I attach into an e-mail the results of either this report or query
as a CSV File?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top