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

Free Support Forum - aspose.com

Delete end notes from word document

Hi, how to delete all endnotes from word document in .net

Hi there,

Thanks for your inquiry. Please use following code example to remove the Endnotes from the document. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "Test.docx");
foreach (Footnote footnote in doc.GetChildNodes(NodeType.Footnote, true))
{
    if (footnote.FootnoteType == FootnoteType.Endnote)
        footnote.Remove();
}
doc.Save(MyDir + "Out.docx");

working fine.
Thank you.

Hi there,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.