Copy content of an Aspose.Words.Document in a Node and paste it into another

My first idea is :
- For the copy: internal static Node nodeBuffer = null;
nodeBuffer = this.innerDocument.Clone(true);

- For the paste : I use the Insert One Document into Another at Any Location article in documentation.
But There is some mistakes.

Could you help me please?

No, you cannot insert document as a node to another document. Although it is not directly imposed by the object model but only nodes of specific types can be inserted as childs to other nodes. To know more about this refer to Composition Diagrams article in the documentation.

And there are plenty of complete examples on document to document insertion in the documantation. Just use one of them.

I can’t use the article Insert One Document into Another at Any Location ?
If no, which one I have to use?

Ok, I see there is a misunderstanding here. First, I don't understand why you are cloning the document. Second, I don't understand why you are casting the Document to Node.

InsertDocument method given in the article takes the document as a parameter. So if you want to insert some document to another document just pass the inserted document as a parameter and also specify the node in the destination document after which you want to do the insertion. This node should be either paragraph or table.

And if you encounter any errors while doing it then please attach the documents and the code snippet. I will research the problem and let you know.

Best regards,

Vladimir Averkin
Developer/Technical Support
Aspose Auckland team

What I want to do is that :
I have a blank document and for example 2 documents with text and pictures.
I’d like to copy content of the first document into the blank document and the content of the second document under the first copy. So next, my blank document became a big document.
Is that clear?
Thanks for your answers

Ok, I see now. Then it seems that "Append One Document to Another" article is more suitable to you. Just create a blank document and append one document, then another, then remove first section of the initial document or otherwise it will remain in the final document as a blank page in the beginning.

Or, even simpler, just append the second document to a first document and save it with another name.

Please try this and let me know if you will have any problems with that.