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

Cloning And Merging With Paragraphs

Thread ID:





59582 Apr 17,2007 07:59 PM UTC Apr 18,2007 01:08 PM UTC ASP.NET Web Forms (Classic) 1
Tags: DocIO
Ho-Ching Yung
Asked On April 17, 2007 07:59 PM UTC


Could you show me a sample code that does
Cloning And Merging With Paragraphs?

P.S. The clone section method works but we need to clone at the Paragraphs level



Bhuvaneswari P [Syncfusion]
Replied On April 18, 2007 01:08 PM UTC

Hi Ho-Ching Yung,

You can clone all the paragraphs from current section and merge it in to the new document by using the following code snippets:


// Enumerate all the sections from the first template document.
IWSectionCollection secs1 = document1.Sections;

foreach (IWSection sec in secs1)
// Adding a new section to the newly created document.
doc.Sections.Add(new WSection (doc));
// Setting section break code to be the same as the template.
doc.LastSection.BreakCode = sec.BreakCode;
// Enumerating all the paragraphs in the current section.
IWParagraphCollection paragraphs = sec.Paragraphs;
// Cloning all the paragraphs from current section and merge it in to the new document.
foreach (IWParagraph paragraph in paragraphs)

Here is the sample for your reference:


Kindly let me know if you have any other questions.

Thank you for your interest in Syncfusion products.

Best Regards,


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

or the page will be automatically redirected to 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