We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Duplicate text

Thread ID:





70193 Nov 30,2007 03:47 PM UTC Dec 3,2007 02:00 PM UTC WinForms 1
Tags: DocIO
Oleg Covic
Asked On November 30, 2007 03:47 PM UTC

I'm new with DocIo.
I want to dublicate the text from one document

for example :
my text {placeholder}
my text1 {placeholder}

my text {placeholder}
my text1 {placeholder}
my text {placeholder}
my text1 {placeholder}

How could I do this ?
Thanks in advance!

Jisha Joy [Syncfusion]
Replied On December 3, 2007 02:00 PM UTC

Hi Oleg,

Thank you for your interest in Syncfusion Products.
This can be achieved by cloning the Paragraph and insert the cloned paragraph at the end of the paragraph.
Here is the code snippets:

//A new document is created.
WordDocument document = new WordDocument();
//Add a new section to the document.
IWSection section = document.AddSection();

//Adding a new paragraph to the section.
IWParagraph paragraph = section.AddParagraph();

paragraph.AppendText("my text {placeholder}\nmy text {placeholder}");
// section.AddParagraph().AppendText("my text {placeholder}\n");

//Clone the particular paragraph:
Entity par = section.Paragraphs[0].Clone();

//Insert the paragraph0
section.Paragraphs.Insert(1, par as IWParagraph);

Please refer the sample in the following link to illustrate this:

Please try this and let me know if you have any questions.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon