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.

Can''t merge multiple DOCs

Thread ID:





91134 Nov 5,2009 05:08 AM Nov 13,2009 08:45 AM Windows Forms 3
Tags: DocIO
Andreas Hirtzel
Asked On November 5, 2009 05:08 AM


I'd like to merge multiple DOCs. The first DOC to merge will do like expected. But if I try to merge the second, I get this exception:

[NullReferenceException: Objekt not set to an instance of an object.]
Syncfusion.DocIO.DLS.WParagraphStyle.CloneListRelationsTo(WordDocument doc)
Syncfusion.DocIO.DLS.WParagraph.CloneStyleTo(WordDocument doc)
Syncfusion.DocIO.DLS.WParagraph.CloneRelationsTo(WordDocument doc)
Syncfusion.DocIO.DLS.WTextBody.CloneRelationsTo(WordDocument doc)
Syncfusion.DocIO.DLS.WSection.CloneRelationsTo(WordDocument doc)
Syncfusion.DocIO.DLS.EntityCollection.OnInsert(Int32 index, Entity entity)
Syncfusion.DocIO.DLS.EntityCollection.CloneTo(EntityCollection destColl)
Syncfusion.DocIO.DLS.WordDocument.ImportContent(IWordDocument doc, Boolean importStyles)

My source code is taken from your samples. Here it is.

IWordDocument doc = new WordDocument();
doc = CreateFirstMergeDoc();
foreach (IWSection sec in doc.Sections)
baseDoc.LastSection.BreakCode = sec.BreakCode;
doc = CreateSecondMergeDoc();
foreach (IWSection sec in doc.Sections)
baseDoc.Sections.Add(sec.Clone()); <-- here rises the exception
baseDoc.LastSection.BreakCode = sec.BreakCode;

I load DOT templates in every Create... method.

What is wrong?

Jafrin [Syncfusion]
Replied On November 6, 2009 04:29 AM

Hi Andreas,

Thank you for using Syncfusion products.

We are not able to reproduce the mentioned issue of “Can't merge multiple documents”.Could you please update us with the your sample document. Could you please find the sample from the below link. Please try running this sample and let us know if this helps.


Please let us know if you have any questions.

Jafrin J

Andreas Hirtzel
Replied On November 11, 2009 09:06 AM

Hi Jafrin,

it works well. Thank you.

Regards, Andreas

Jafrin [Syncfusion]
Replied On November 13, 2009 08:45 AM

Hi Andreas,

Thank you for your update. Please let us know if you have any other new queries.

Jafrin J


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.

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.