FootnoteIsAuto Property

Holds a value that specifies whether this is a auto-numbered footnote or footnote with user defined custom reference mark.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool IsAuto { get; set; }

Property Value

Type: Boolean
Remarks
ReferenceMark initialized with empty string if IsAuto set to false.
Examples
Shows how to add a footnote to a paragraph in the document and set its marker.
// 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