AODL example 11

From Apache OpenOffice Wiki
Jump to: navigation, search

Creating Footnotes and Endnotes

//Create new TextDocument
TextDocument document = new TextDocument();
document.New();
//Create a new Paragph
Paragraph para = ParagraphBuilder.CreateStandardTextParagraph(document);
//Create some simple Text
para.TextContent.Add(new SimpleText(document, "Some simple text. And I have a footnode"));
//Create a Footnote
para.TextContent.Add(new Footnote(document, "Footer Text", "1", FootnoteType.footnode));			
//Add the paragraph
document.Content.Add(para);
//Save
document.SaveTo("footnote.odt");

Back to the AODL examples overview.

Personal tools