Unable to find InsertDocument() method under DocumentBuilder

Hi ,

Below example from Aspose site is NOT woking as there is NO direct method InsertDocument under DocumentBuilder class. Please check and let us how to insert the child document into parent document while preserving the child document formatting using DocumentBuilder class.

http://www.aspose.com/docs/display/wordsnet/Inserting+Document+Elements#InsertingDocumentElements-InsertDocument

"

Inserting content of the Document

Use DocumentBuilder.InsertDocument to insert content of a Document into the current position of DocumentBuilder's cursor. This method accepts two parameters: source document for inserting, and import format mode to merge style formatting that clashes.

Example

Inserts content of the document into the current position of DocumentBuilder's cursor.

Visual Basic
Dim docSrc As New Document("path to source document")
Dim docDst As New Document("path to destination document")
Dim builder As New DocumentBuilder(docDst)
builder.InsertDocument(docSrc, importFormatMode) ' docSrc inserted into docDst at the current position of builder's cursor.
 "
 

Hi,

We are using Aspose 14.5.0.0 version to generate the MS word .doc documents in my project.

There is a scenerio where we want to copy the data with formating from the child document to the current cursor position in the parent document. On research we found that InsertDocument method of the builder object does exactly that. We got the below link:

http://www.aspose.com/docs/display/wordsnet/Inserting+Document+Elements#InsertingDocumentElements-InsertDocument

But we CANNOT FIND the InsertDocument method in the builder object.

Can you please help us understanding if we missed anything somewhere?

Thanks,

Prajakta.

Hi Prajakta,

Thanks for your inquiry. Please make sure that you are using latest version of Aspose.Words for .NET 15.4.0.

Please first remove
Aspose.Words completely from your system. Then remove the reference to
old Aspose.Word.dll from your project. Install the latest
version of Aspose.Word via msi installer. Add reference to this new DLL
in your project and re-build it. Please let us know how it goes on your
side. I hope, this will help.


PS: To
check version of the library, right click on the dll, select Properties
from the context menu, then select Details/Version tab. You will see
File version.