ActiveSheet.copy
ActiveWorkbook.SaveAs "C:\MyFolder\MyFile.txt", xlCSV
Activeworkbook.Close SaveChanges:=False
Change xlCSV to the type of text file you want.
--
Regards,
Tom Ogilvy
"Michael" wrote in message
om...
Hello,
I'm using excel to generate quite large text files. I want to save
automatically from a VB script the result of an excel sheet in a text
file. But using the "save as" function changes the document type of my
excel sheet.
Is there any option to just export the text file and leaving the Excel
sheet as it is?
Yours
Michael