Argg Cetin
I now what the problem is although I dont know how to fix it!!
When I said I was losing the formatting I meant if I piped the contents to a Messagebox or use the variable as a parameter to send to my mailing program. If I do a strtofile the txt file generated is perfect!
I suppose I could use the text file as an attachment but I would prefer the results in tabular form on the body of the email.
Thanks
Neil Lewis
IT R&D Manager
Velmore Ltd