Class Footnote
Represents the footnote in the word document.
Inheritance
System.Object
Footnote
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class Footnote : Object
Examples
The following code example demonstrates how to to change the default footnote separator.
private void Button1_Click(System.Object sender, System.EventArgs e)
{
//Create a new Word document
WordDocument document = new WordDocument();
//Create a section
IWSection section = document.AddSection();
//Add a paragraph to a section
IWParagraph paragraph = section.AddParagraph();
//Append the text to paragraph
paragraph.AppendText("Working with footnotes");
//Formatting the text
paragraph.ApplyStyle(BuiltinStyle.Heading1);
//Add a paragraph to a section
paragraph = section.AddParagraph();
//Append the footnotes
WFootnote footnote = (WFootnote)paragraph.AppendFootnote(Syncfusion.DocIO.FootnoteType.Footnote);
WTextBody separator = document.Footnotes.Separator;
//Replace the default foot note separate by text
separator.Paragraphs[0].Text = "Footnote separator";
//Set the footnote character format
footnote.MarkerCharacterFormat.SubSuperScript = SubSuperScript.SuperScript;
//Inserts the text into the paragraph
paragraph.AppendText("Sample content for footnotes").CharacterFormat.Bold = true;
//Add footnote text
paragraph = footnote.TextBody.AddParagraph();
paragraph.AppendText("Adventure Works Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company. The company manufactures and sells metal and composite bicycles to North American, European and Asian commercial markets. While its base operation is in Bothell, Washington with 290 employees, several regional sales teams are located throughout their market base.");
//Save and close the Word document instance
document.Save("Sample.docx", FormatType.Docx);
document.Close();
}
Private Sub button_Click(sender As Object, e As EventArgs)
End Sub
Constructors
Footnote(WordDocument)
Initializes a new instance of the Footnote class.
Declaration
public Footnote(WordDocument document)
Parameters
| Type | Name | Description |
|---|---|---|
| WordDocument | document | The WordDocument object. |
Properties
ContinuationNotice
Gets or sets the footnote continuation notice of the document.
Declaration
public WTextBody ContinuationNotice { get; set; }
Property Value
| Type | Description |
|---|---|
| WTextBody | The WTextBody that represents the continuation notice. |
ContinuationSeparator
Gets or sets the footnote continuation separator of the document.
Declaration
public WTextBody ContinuationSeparator { get; set; }
Property Value
| Type | Description |
|---|---|
| WTextBody | The WTextBody that represents the continuation separator. |
Separator
Gets or sets the footnote separator of the document.
Declaration
public WTextBody Separator { get; set; }
Property Value
| Type | Description |
|---|---|
| WTextBody | The WTextBody that represents the separator. |
Methods
Clone()
Creates a duplicate copy of the current footnote.
Declaration
public Footnote Clone()
Returns
| Type | Description |
|---|---|
| Footnote | The cloned Footnote object. |