Automating Text File Export

P

PWait

Hi have successfully been able to send excel files by using the code
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97
..To = EmailAddress
.Subject = EmailSubject
.Body = EmailBody
.Attachments.Add (TextFileNameMyFile)
However when I attempt to change to a text file I receive an "unknown file
format" error.
Can anyone point me in the right direction? I am currently running XP
 
D

Dirk Goldgar

PWait said:
Hi have successfully been able to send excel files by using the code
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97
.To = EmailAddress
.Subject = EmailSubject
.Body = EmailBody
.Attachments.Add (TextFileNameMyFile)
However when I attempt to change to a text file I receive an "unknown
file format" error.
Can anyone point me in the right direction? I am currently running
XP

Please post the actual code that is raising the error, and indicate on
which line the error is occurring.
 

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