SectionProtectedForForms Property

True if the section is protected for forms. When a section is protected for forms, users can select and modify text only in form fields in Microsoft Word.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.10.0


public bool ProtectedForForms { get; set; }

Property Value

Type: Boolean


Shows how to protect a section so only editing in form fields is possible.
Document doc = new Document();

// Insert two sections with some text
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Section 1. Unprotected.");
builder.Writeln("Section 2. Protected.");

// Section protection only works when document protection is turned and only editing in form fields is allowed

// By default, all sections are protected, but we can selectively turn protection off
doc.Sections[0].ProtectedForForms = false;

doc.Save(ArtifactsDir + "Section.Protect.docx");

ExpandedSee Also