using System;
using System.Drawing;
using Docs.Word;


namespace SampleManager
{
	class Sections_SectionBreaks
	{
		internal static Document Main1()
		{
			//	Open the document with given name
			Document Doc = Document.ReadDOC(Form1.SourceFolder + "Sections - SectionBreaks.doc");

			//	Change section break type for both sections
			Doc.Sections[0].Style.SectionBreak = SectionBreakStyle.NewPage;
			Doc.Sections[1].Style.SectionBreak = SectionBreakStyle.NewPage;

			//	Change text of first paragraph of second section
			Paragraph Par = (Paragraph)Doc.Sections[1].Nodes[0];
			Par.Textruns.Clear();
			Par.AddTextrun("Here begins a new section. As you can see,"
				+ "the section break above has \"New Page\" type,"
				+ " so this new section starts on the next page.");
			Par.Textruns.Style.TextColor = Color.Red;

			return Doc;
		}
	}
}
