Hello!
I'll say you for .txt files (text files). I brlive for .doc is the same.
string fromLabel;
string fromTB;
string Path = @"C:\Users\Administrator\";
void FileWrite(string TextHere, string path)
{
string line = TextHere;
System.IO.StreamWriter file = new System.IO.StreamWriter(path);
file.WriteLine(line);
file.Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
fromTB = textBox1.Text;
}
private void button1_Click(object sender, EventArgs e)
{
FileWrite(fromTB, Path);
FileWrite(fromLabel, Path);
}