How to Insert text in the end of the document

前端 未结 2 871
遇见更好的自我
遇见更好的自我 2020-12-17 04:42

I am trying to insert text into the word document. But whenever i execute my code the text enter by me in the text box is always added in the beginning. I am unable to inser

2条回答
  •  孤街浪徒
    2020-12-17 04:54

    You have to use append method to add the text within the same line rather than entering in next line Ex:

    File.AppendAllText(@"c:\path\file.txt", textBox1.Text);
    

    This might help

提交回复
热议问题