I have a form that asks questions and you write an answer in a text box. When you hit 'next' or 'add' it should save the input and cycle like this until you hit save. For whatever reason, it only saves the one line and not the subsequent lines. Here's the code I have.
private void add_Click(object sender, EventArgs e)
{
Paragraph question = document.AddSection().AddParagraph();
question.AppendText(questions.Text + " " + answer.Text);
document.SaveToFile(teamMember.Text + ".doc", FileFormat.Doc);
}
private void finish_Click(object sender, EventArgs e)
{
document.SaveToFile(teamMember.Text + ".doc", FileFormat.Doc);
}
Not sure if I understand you correctly. From your code, I found that each time you were adding a new section, this will cause each of the question and the answer to be added to a new section of the document. If this is the problem, you can try the following code:
Hope it helps.