Hi Luke,
Thank you for your update.
From the given details, we suspect that your requirement is to remove header from the document. For this, you can use the below code example.
foreach (WSection section in document.Sections) { section.HeadersFooters.Header.ChildEntities.Clear(); section.HeadersFooters.FirstPageHeader.ChildEntities.Clear(); section.HeadersFooters.EvenHeader.ChildEntities.Clear(); section.HeadersFooters.OddHeader.ChildEntities.Clear(); } |