How to set the cursor position in docx using

2 posts, 0 answers
  1. Todd
    Todd avatar
    5 posts
    Member since:
    Oct 2016

    Posted 13 Oct Link to this post

     

     

     

     

    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);
    }

  2. Mihail
    Admin
    Mihail avatar
    192 posts

    Posted 14 Oct Link to this post

    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

Back to Top