Click or drag to resize
FootnoteType Enumeration
Specifies whether this is a footnote or an endnote.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public enum FootnoteType
Members
  Member nameValueDescription
Footnote0 The object is a footnote.
Endnote1 The object is an endnote.
Remarks

Both footnotes and endnotes are represented by objects by the Footnote class. Use FootnoteType to distinguish between footnotes and endnotes.

Examples
Shows how to add a footnote to a paragraph in the document using DocumentBuilder.
[C#]

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

for (int i = 0; i <= 100; i++)
{
    builder.Write("Some text " + i);

    builder.InsertFootnote(FootnoteType.Footnote, "Footnote text " + i);
    builder.InsertFootnote(FootnoteType.Footnote, "Footnote text " + i, "242");
}
Examples
Shows how to add a footnote to a paragraph in the document and set its marker.
[C#]

// Create a new document and append some text that we will reference with a footnote
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Main body text.");

// Add a footnote and give it text, which will appear at the bottom of the page
Footnote footnote = builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.");

// This attribute means the footnote in the main text will automatically be assigned a number, "1" in this instance
// The next footnote will get "2"
Assert.True(footnote.IsAuto);

// We can edit the footnote's text like this
// Make sure to move the builder back into the document body afterwards
builder.MoveTo(footnote.FirstParagraph);
builder.Write(" More text added by a DocumentBuilder.");
builder.MoveToDocumentEnd();

Assert.AreEqual("Footnote text. More text added by a DocumentBuilder.", footnote.Paragraphs[0].ToString(SaveFormat.Text).Trim());

builder.Write(" More main body text.");
footnote = builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.");

// Substitute the reference number for our own custom mark by setting this variable, "IsAuto" will also be set to false
footnote.ReferenceMark = "RefMark";
Assert.False(footnote.IsAuto);

// This bookmark will get a number "3" even though there was no "2"
builder.Write(" More main body text.");
footnote = builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.");
Assert.True(footnote.IsAuto);

doc.Save(ArtifactsDir + "InlineStory.AddFootnote.docx");
See Also

Reference

FootnoteTypeFootnote