This message was posted using Page2Forum from DocumentBuilder.MoveToHeaderFooter Method - Aspose.Words for .NET
Thanks for your request. I think, you can simply try to get an ancestor of the paragraph of the specific type. If ancestor of this type is not null then paragraph is a child of this ancestor. For example:
/// Returns tru if the node is inside HeaderFooter.
private bool IsHeaderFooterChild(Node node)
return node.GetAncestor(NodeType.HeaderFooter) != null;
Hope this helps.