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. Image for the cookie policy date

RE: Merging two documents

Hi All

I am new to Syncfusion. I wanted to know how I can append two documents? Doc 2's contents into Doc 1.

Thanks
Kalpana

3 Replies

DK Dhivya K Syncfusion Team December 8, 2006 03:59 AM UTC

Hi Kalpana,

Thank you for your interest in Essential DocIO.
We do have options for cloning and merging document contents as follows:

C#:

// Cloning all the sections one by one and merging it.
foreach ( IWSection sec in doc2.Sections )
{
doc1.Sections.Add( sec.Clone( doc2 ) );
}

Could you please refer to the sample at following url after installing Essential DocIO?
C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\Windows\DocIO.Windows\Samples\Advanced Features\CloningandMerging

Please let me know if you have any queries.

Regards,
Dhivya.


AD Administrator Syncfusion Team October 13, 2011 04:13 PM UTC

Hi,

I'm wondering if this is still the recommended way of merging two different documents. Or is there another method that does not involve cloning each section.

Thanks!



PR Poornima R Syncfusion Team October 19, 2011 07:18 AM UTC

Hi Kalpana,

Thank you for your update.

Currently DocIO provide support for cloning and merging the entire content from source document (doc2.doc) to the destination document (doc1.doc) using ImportContent() method instead of cloning and merging each section. Please refer the code snippet from below illustrating the same. Try using the below code snippet and let us know if this helps you.

Code:
doc1.ImportContent(doc2);

Please refer the below UG link for more information
http://help.syncfusion.com/ug_93/Reporting/DocIO/ASP.NET/default.htm?turl=Documents%2F431cloningandmerging.htm

Please let us know if you have any questions.

Regards,
Poornima




Loader.
Live Chat Icon For mobile
Up arrow icon