C#操作word
Document doc = new Document();
Section sec = doc.AddSection();
Paragraph Para = sec.AddParagraph();
Para.AppendText("通知内容:"+dtView.Rows[0]["NR"].ToString());
doc.SaveToFile(strAttachmentFilePath+ NFILEPATH, FileFormat.Docx);
FileStream fs = File.Create(@"F:\\TEST2.txt");
StreamWriter sw = new StreamWriter(fs);
sw.Write("ABC");//开始写入值
sw.Flush();
sw.Close();