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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can''t merge multiple DOCs

Thread ID:

Created:

Updated:

Platform:

Replies:

91134 Nov 5,2009 10:08 AM UTC Nov 13,2009 01:45 PM UTC WinForms 3
loading
Tags: DocIO
Andreas Hirtzel
Asked On November 5, 2009 10:08 AM UTC

Hi,

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.Sections.Add(sec.Clone());
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 09:29 AM UTC

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.

Sample:
http://files.syncfusion.com/support/DocIO.Web/Forum/91134DocumentMerge/DocumentMerge.zip

Please let us know if you have any questions.

Regards,
Jafrin J

Andreas Hirtzel
Replied On November 11, 2009 02:06 PM UTC

Hi Jafrin,

it works well. Thank you.

Regards, Andreas

Jafrin [Syncfusion]
Replied On November 13, 2009 01:45 PM UTC

Hi Andreas,

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

Regards,
Jafrin J


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

;