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

Free Support Forum - aspose.com

Skipping Header/Footer

Is there a way to "skip" past the header and footer of a document?

For example, I would like to find the first (or actually all) tables in the document, that are not in the header and footer.

Thank you for you help,

matt

Hi Matt,


Thanks for your inquiry.

Sure, you can either of the two methods below:

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>NodeList<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> tables =
doc.SelectNodes("//Body/Table");

<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”>

Or


foreach (Table table in doc.GetChildNodes(NodeType.Table, true))

{

if (table.GetAncestor(NodeType.HeaderFooter) == null)

{

// This is a table in the document body.

}

}


If we can help with anything else, please feel free to ask.

Thanks,

Thanks for the quick reply, this worked perfectly.

Thanks!