Class Endnote
Represents an endnote in the Word document.
Inheritance
System.Object
Endnote
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class Endnote : Object
Examples
The following code example demonstrates how to
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 section
paragraph = section.AddParagraph();
//Append the endnote
WFootnote endnote = (WFootnote)paragraph.AppendFootnote(Syncfusion.DocIO.FootnoteType.Endnote);
WTextBody separator = document.Endnotes.Separator;
//Replace the default foot note separate by text
separator.Paragraphs[0].Text = "Endnote separator";
//Set the endnote character format
endnote.MarkerCharacterFormat.SubSuperScript = SubSuperScript.SuperScript;
//Insert the text into the paragraph
paragraph.AppendText("Sample content for endnotes").CharacterFormat.Bold = true;
//Add the footnote text
paragraph = endnote.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)
'Create a new Word document
Dim document As New WordDocument()
'Create a section
Dim section As IWSection = document.AddSection()
'Add a paragraph to a section
Dim paragraph As IWParagraph = section.AddParagraph()
'Append the text to paragraph
paragraph.AppendText("Working with footnotes")
'Formatting the text
paragraph.ApplyStyle(BuiltinStyle.Heading1)
'Add a paragraph to section
paragraph = section.AddParagraph()
'Append the endnote
Dim endnote As WFootnote = DirectCast(paragraph.AppendFootnote(Syncfusion.DocIO.FootnoteType.Endnote), WFootnote)
Dim separator As WTextBody = document.Endnotes.Separator
'Replace the default foot note separate by text
separator.Paragraphs(0).Text = "Endnote separator"
'Set the endnote character format
endnote.MarkerCharacterFormat.SubSuperScript = SubSuperScript.SuperScript
'Insert the text into the paragraph
paragraph.AppendText("Sample content for endnotes").CharacterFormat.Bold = True
'Add the footnote text
paragraph = endnote.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()
End Sub
Constructors
Endnote(WordDocument)
Initializes a new instance of the Endnote class.
Declaration
public Endnote(WordDocument document)
Parameters
| Type | Name | Description |
|---|---|---|
| WordDocument | document | The WordDocument object. |
Properties
ContinuationNotice
Gets or sets the endnote 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 endnote 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 endnote separator of the document.
Declaration
public WTextBody Separator { get; set; }
Property Value
| Type | Description |
|---|---|
| WTextBody | The WTextBody that represents the separator. |
Methods
Clone()
Creates the duplicate copy of the current endnote.
Declaration
public Endnote Clone()
Returns
| Type | Description |
|---|---|
| Endnote | The cloned Endnote object. |