Imports Docs.Word



Public Class Documents_SetProtection
	Friend Shared Function Main1() As Document
		'	Open the document with given name
		Dim Doc As Document = 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
	End Function
End Class
