Document.Footnotes Property | Office File API | DevExpress Documentation Skip to main content
All docs
V26.1
  • Document.Footnotes Property

    Provides access to the document’s footnotes.

    Namespace: DevExpress.XtraRichEdit.API.Native

    Assembly: DevExpress.RichEdit.v26.1.Core.dll

    Declaration

    NoteCollection Footnotes { get; }

    Property Value

    Remarks

    The NoteCollection contains document footnotes - notes that appear at the bottom of the page. Call the NoteCollection.Insert method to insert a new note into the specific document position. Pass the symbol used to mark the reference to the Insert method to insert a note with a custom mark.

    Access a collection item by its index. The Note object represents a footnote. You can check whether the note has a custom mark (Note.IsCustom), and access a range related to the reference mark (Note.Range). Call the Note.BeginUpdate and Note.EndUpdate paired methods to initiate the update session and access the note’s content.

    The code sample below shows how to insert a footnote and append a text:

    using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
    {
        wordProcessor.LoadDocument("Document.docx");
        Document document = wordProcessor.Document;
    
        //Insert a new footnote at the end of the 6th paragraph:
        DocumentPosition footnotePosition = 
        document.CreatePosition(document.Paragraphs[5].Range.End.ToInt() - 1);
        Note footnote = document.Footnotes.Insert(footnotePosition);
    
        //Access the footnote content
        //And insert text:
        SubDocument footnoteContent = footnote.BeginUpdate();
        footnoteContent.AppendText("First footnote");
    
        //Finalize the update:
        footnote.EndUpdate(footnoteContent);
    }
    

    Use the NoteCollection.HasSeparator method to determine what separators the footnotes have. The NoteSeparatorType enumeration lists available separator types. Use the NoteCollection.BeginUpdateSeparator and NoteCollection.EndUpdateSeparator paired method to initiate an update session and access separator content.

    See Also
    Use of this site constitutes acceptance of our Website Terms of Use and Privacy Policy (Updated). Cookies Settings