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.
 
Top