This is a migrated thread and some comments may be shown as answers.

How to set the cursor position in docx using

1 Answer 159 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 14 Oct 2016, 01:29 AM

 

 

 

 

DocxFormatProvider provider = new DocxFormatProvider();
using (Stream input = File.OpenRead("InputFile.docx"))
{
    RadFlowDocument document = provider.Import(input);
    RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);
    Run firstRun = document.EnumerateChildrenOfType<Run>().First();
editor.MoveToInlineEnd(firstRun);
editor.InsertText("Hello word!");
//DocxFormatProvider provider = new DocxFormatProvider();
using (Stream output = File.OpenWrite("F:/POCForSOW/ConsoleApplication1/ConsoleApplication1/Sample.docx"))
{
//RadFlowDocument document = CreateRadFlowDocument();
provider.Export(document, output);
}

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 14 Oct 2016, 10:36 AM
Hello Todd,

I have answered your question in the duplicated thread with the same name. Here is the link: http://www.telerik.com/forums/how-to-set-the-cursor-position-in-docx-using-radflowdocumenteditor

Regards,
Mihail
Telerik by Progress

Tags
WordsProcessing
Asked by
Todd
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or