We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How do I copy a table from one doc to another

using aspose.word for .Net

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You should use ImportNode method in this case. Please follow the link to learn how to import nodes from one document to another.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.importnode_overload_2.html

Also, see the following code snippet:

//Open source and destination documents

Document srcDoc = new Document(@"Test169\srcDoc.doc");

Document dstDoc = new Document(@"Test169\dstDoc.doc");

//Get some table from source document

Table srcTab = srcDoc.FirstSection.Body.Tables[0];

//Import table node into the destination document

Node dstNode = dstDoc.ImportNode(srcTab, true, ImportFormatMode.KeepSourceFormatting);

//Insert it into the document

dstDoc.FirstSection.Body.AppendChild(dstNode);

//Save document

dstDoc.Save(@"Test169\out.doc");

Best regards.