Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Below is the code to demonstrate how to insert footer in word document:
C#
Document wordDocument = new Document("Convert Word Doc to Other Formats.doc");
HeaderFooterCollection footers = wordDocument.FirstSection.HeadersFooters;
foreach (HeaderFooter footer in footers)
{
if (footer.HeaderFooterType == HeaderFooterType.FooterFirst | | footer.HeaderFooterType == HeaderFooterType.FooterPrimary | | footer.HeaderFooterType ==
HeaderFooterType.FooterEven)
Console.WriteLine(footer.GetText());
}
Below is the code to demonstrate how to insert footer in word document using NPOI:
C#
XWPFDocument wordDocument = new XWPFDocument(new FileStream("Working with Footers.doc", FileMode.Open));
IList<XWPFFooter> footers = wordDocument.FooterList;
foreach (XWPFFooter footer in footers)
{
Console.WriteLine(footer.Text);
}
Download Working with Footers from any of the below mentioned social coding sites:
Download Working with Footers from any of the below mentioned social coding sites:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.