What is the best recommended way to iterate through the document including Paragraphs and tables. I wish to include Shapes, OLE objects, equations and Tables. I wish to ignore table of contents. I understand that Paragraph includes the shapes , OLEObjects
-
If iterate though all the nodes with Node.Type = Any it brings in a lot of nodes that I really do not need to process.
NodeCollection nodes = doc.GetChildNodes(NodeType.Any, true); -
I read in 1 of your article ( Iterate over the document) that using
Node node = doc;
while(node != doc.getLastSection().getBody().getLastParagraph().getLastChild())
{
node = node.nextPreOrder(doc);
}
Would be better.
Please let me know what is the best way to iterate though shapes, tables, paragraphs, equations, OLE Objects. And exclude header/footer Table of contents.
Suggest the best way considering performance.