I am starting with an existing document, which is attached, and trying to figure out how to correctly set the position so I can start adding text at a certain point in the document. The key is how do you find that point so the RadFlowDocumentEditor can begin adding and creating tables in the document. I am not trying to do a mail merge. All I want to do is get a certain position within the document to begin adding text. Is there something special you need to do inside of the word document itself? Here is the code I used to try and hopefully set the position, but it adds text to the top of the document and wipes out the existing text. If you could provide me a code snippet or some guidance, I would appreciate it.
DocxFormatProvider provider = new DocxFormatProvider();
using (Stream input = File.OpenRead("Input.docx"))
{
RadFlowDocument document = provider.Import(input);
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);
Run firstRun = document.EnumerateChildrenOfType<Run>().First();
editor.MoveToInlineEnd(firstRun);
editor.InsertText("Hello word!");
using (Stream output = File.OpenWrite("Output.docx"))
{
provider.Export(document, output);
}
}