Inserting RTF content in existing text range in Word using Interop assemblies c# RRS feed

  • Question

  • I'm working on generating the complex report from my WPF application in word format. Some of the content, I need to insert in the report is of RTF type. I'm not able to figure out the way to insert the RTF content at the end of particular text range. As of now, I only know one way of adding the RTF content to word document programatically and that is by setting the RTF content in clipboard and then paste the data back. But I'm not able to find the way to paste the content exactly after the existing content of text range. I tried to add the paragraph at the end of text range and paste my RTF content to it but after looping through multiple paste operation final content I see in document is jumbled up and not in correct order.

    I need to know a way to insert RTF content properly at particular location in text range. Can any one pls help with this (preferably with code snippet)?


    Krunal C

    • Moved by CoolDadTx Thursday, September 20, 2018 2:03 PM Office related
    Wednesday, September 19, 2018 3:35 AM