I'm trying to merge several files generated at runtime using SyncFusion 5.1.0.54
but i'm getting the following exception:
?ex
{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "A referência de objecto não foi definida como uma instância de um objecto."
Source: "Syncfusion.DLS.Base"
StackTrace: " at Syncfusion.DLS.Picture..ctor(Picture pic, IParagraph paragraph)
at Syncfusion.DocIO.DLS.WPicture..ctor(WPicture pic, IParagraph paragraph)
at Syncfusion.DocIO.DLS.WPicture.Clone(IParagraph paragraph)
at Syncfusion.DLS.Paragraph..ctor(IParagraph paragraph, IDocument doc)
at Syncfusion.DocIO.DLS.WParagraph.CloneImpl(IDocument doc)
at Syncfusion.DLS.TableCell..ctor(TableCell cell, TableRow row)
at Syncfusion.DocIO.DLS.WTableCell..ctor(WTableCell cell, TableRow row)
at Syncfusion.DocIO.DLS.WTableCell.CloneImpl(TableRow row)
at Syncfusion.DLS.TableRow..ctor(TableRow row, Table owner)
at Syncfusion.DocIO.DLS.WTableRow..ctor(WTableRow row, Table owner)
at Syncfusion.DocIO.DLS.WTableRow.CloneImpl(Table table)
at Syncfusion.DLS.Table..ctor(ITable table, IParagraph paragraph)
at Syncfusion.DocIO.DLS.WTable.Clone(IParagraph paragraph)
at Syncfusion.DLS.Paragraph..ctor(IParagraph paragraph, IDocument doc)
at Syncfusion.DocIO.DLS.WParagraph.CloneImpl(IDocument doc)
at Syncfusion.DLS.TableCell..ctor(TableCell cell, TableRow row)
at Syncfusion.DocIO.DLS.WTableCell..ctor(WTableCell cell, TableRow row)
at Syncfusion.DocIO.DLS.WTableCell.CloneImpl(TableRow row)
at Syncfusion.DLS.TableRow..ctor(TableRow row, Table owner)
at Syncfusion.DocIO.DLS.WTableRow..ctor(WTableRow row, Table owner)
at Syncfusion.DocIO.DLS.WTableRow.CloneImpl(Table table)
at Syncfusion.DLS.Table..ctor(ITable table, IParagraph paragraph)
at Syncfusion.DocIO.DLS.WTable.Clone(IParagraph paragraph)
at Syncfusion.DLS.Paragraph..ctor(IParagraph paragraph, IDocument doc)
at Syncfusion.DocIO.DLS.WParagraph.CloneImpl(IDocument doc)
at Syncfusion.DLS.Section..ctor(ISection section, IDocument doc)
at Syncfusion.DocIO.DLS.WSection.CloneImpl(IDocument document)
at Syncfusion.DLS.Section.Clone(IDocument document)
the exception ocurres with the following code:
For Each MySection In aSyncDocument.Document.Sections
DirectCast(Me.Document.Sections, Syncfusion.DLS.ISectionCollection).Add(MySection.Clone(Me.Document))
Me.Document.LastSection.BreakCode = MySection.BreakCode
Next
the content of aSyncDocument.Document is the attachment. i got it using aSyncDocument.Document.Save method.
aSyncDocument.Document is the SyncFusion.DocIO.DLS.WordDocument.
the Me.Document is the final merger document.
test96.zip