C#: Online Guide
How To: Word SDK
Footnote & Endnote Processing
Footnote & Endnote Processing
  |  
Home ›› XDoc.Word ›› C# Word: Process Footnote & Endnote

C# Word - Footnote & Endnote Processing in C#.NET


Provide Variety of  C# Methods to Process Footnote & Endnote in Word Document




Overview



C#.NET Word document footnote & endnote processing Interface control (XDoc.Word).//More TODO is a tool which allow users to process footnote and endnote in an existing or new Word document.


Related .net document control helps:
asp.net mvc pdf editor using c#: ASP.NET MVC PDF Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net pdf editor using c#: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
c# asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: view, annotate, redact Adobe PDF files online in ASP.NET
c# asp.net iis document viewer: C# HTML5 Viewer: Deployment on IIS
asp.net webforms pdf editor using c#: ASP.NET WebForms PDF Editor: create, view, edit, annotate, redact PDF file in ASP.NET WebForms application
c# asp.net image viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
c# asp.net dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET




C# DLLs: Word Footnote and Endnote Processing



Add references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.Word.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.Word;




Create Footnote & Endnote



The following demo code describe how to create a footnote and endnote in current paragraph.




String docFilePath = @"";
//Open the document
DOCXDocument document =DOCXDocument.Open(docFilePath);
//Get the main document
IDocument doc = document.GetDocument();
//Create a empty paragraph in body
IParagraph paragraph = doc.CreateParagraph();
//Before create footnote and endnote,run must created in paragraph
IRun run = paragraph.CreateARun();
run.CreateText("This is a run created for footnote and end note");
//Create a footenote for paragraph
IFootNote footnote = paragraph.CreateFootNote(0);
//More TODO:May create some block in footnote
//Create an endnote for paragraph
IEndNote endnote = paragraph.CreateEndnote(0);
//More TODO:May create some block in endnote

//Save the document
doc.Save(@"");





Create or Add Paragraph in Footnote & Endnote



This is a C# sample code which illustrates how to create paragraph in the footnote.




String docFilePath = @"";
//Open the document
DOCXDocument document = DOCXDocument.Open(docFilePath);
//Get the main document
IDocument doc = document.GetDocument();
//Create a paragraph for document
IParagraph paragraph = doc.CreateParagraph();
//Create a run for paragraph
IRun run = paragraph.CreateARun();
//Create text for run
run.CreateText("Paragrah for footnote and endnote");

//Just Show how to create a footnote and create paragraph for it.
//1.Create a footnote
IFootNote footnote = paragraph.CreateFootNote(0);
//2.Create a paragraph for footnote
IParagraph footnotePara = footnote.CreateParagraph();
//3.Create a Run for paragraph in footnote
IRun footnoteRun = footnotePara.CreateARun();
//4.Create text for run
footnoteRun.CreateText("Text created in footnote!");
//MORE TODO:
//
//
doc.Save(@"");





Create or Add Table in Footnote & Endnote



The following demo code shows how to create table in the footnote.




String docFilePath = @"";
//Open the document
DOCXDocument document = DOCXDocument.Open(docFilePath);
//Get the main document
IDocument doc = document.GetDocument();
//Create a paragraph for document
IParagraph paragraph = doc.CreateParagraph();
//Create a run for paragraph
IRun run = paragraph.CreateARun();
//Create text for run
run.CreateText("Paragrah for footnote and endnote");

//Just Show how to create a footnote and create table for it.
//1.Create a footnote
IFootNote footnote = paragraph.CreateFootNote(0);
//2.Create a table with 3 culumns and 3 rows for footnote
ITable footnoteTable = footnote.CreateTable(3, 3);
//MORE TODO:
//
//
doc.Save(@"");