How to check document has only header text using aspose.words?

how to check document has only header text using aspose.words?

Hello
Thanks for your request. You can try using the code like the following:

Document doc = new Document("C:\\Temp\\in.docx");
foreach(Paragraph par in doc.GetChildNodes(NodeType.Paragraph, true))
{
    if (par.GetAncestor(NodeType.HeaderFooter) != null)
        Console.WriteLine(par.GetText() + " - This Paragraph Is Inside HeaderFooter");
}

Best regards,

yeah thanks for your reply…it works fine…