using System;
using Docs.Word;


namespace SampleManager
{
	class Textruns_Footnotes
	{
		internal static Document Main1()
		{
			//	Open the document with given name and get first paragraph
			Document Doc = Document.ReadDOC(Form1.SourceFolder + "Textruns - Footnotes.doc");
			Paragraph Par = (Paragraph)Doc.Sections[0].Nodes[0];

			//	Set up footnote and endnote styles
			Doc.Sections[0].Style.FootnoteStyle.Positioning = FootnotesPlacement.BeneathText;
			Doc.Sections[0].Style.EndnoteStyle.Positioning	= EndnotesPlacement.EndOfSection;

			//	Make footnote and endnote
			Par.GetTextrun(31, 27).AddFootnote("Footnote 1");
			Par.GetTextrun(194, 10).AddEndnote("Endnote 1");

			return Doc;
		}
	}
}
