| Ahhh, today is saturday woke up little early (6:00 AM). Anyway, I went to ASP.NET forums to check out some questions and one developer asked "How can I write text to a word file.". So, here is the code to write text to a word file: private void WriteToWordFile() { // Any folder string path = @"C:\ServerFolder\MyWordFile.doc"; string text = TextBox2.Text; // Put it in try-catch finally :) FileStream fs = File.Create(path); fs.Close(); StreamWriter sw = new StreamWriter(path); sw.Write(text); sw.Close(); }
Okay me leaving for Job! powered by IMHO |
Print | posted @ Saturday, October 08, 2005 8:12 AM