I am creating a new Aspose word document based on an existing word document template.
Hi David,
Thanks for your inquiry. Please use CompositeNode.GetChildNodes method (NodeType, Boolean) to get a live collection of child nodes that match the specified type.
A live collection is always in sync with the document. For example, if you selected all sections in a document and enumerate through the collection deleting the sections, the section is removed from the collection immediately when it is removed from the document.
Please check the following code example to achieve your requirements and let us know if you have any more queries.
Document doc = new Document(MyDir + "in.docx");
foreach (Table tabl in doc.GetChildNodes(NodeType.Table, true))
{
}