using System;
using Docs.Word;


namespace SampleManager
{
	class Documents_SetProtection
	{
		internal static Document Main1()
		{
			//	Open the document with given name
			Document Doc = Document.ReadDOCX(Form1.SourceFolder + "Documents - SetProtection.docx");

			//	Enable protection from editing for all sections with enabled protection
			Doc.Properties.DocStatus.ProtectionEnabled = true;
			//	Enable protection for the first section of document
			Doc.Sections[0].Style.Protected = true;

			return Doc;
		}
	}
}
