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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cloning And Merging With Paragraphs

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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


Thanks

Ho-Ching


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:

[C#]

// 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)
doc.LastSection.Paragraphs.Add(paragraph.Clone(doc));
}

Here is the sample for your reference:

http://websamples.syncfusion.com/samples/DocIO.Web/4.4.0.51/33404/main.htm

Kindly let me know if you have any other questions.

Thank you for your interest in Syncfusion products.

Best Regards,
Bhuvaneswari

CONFIRMATION

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.

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

;