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

ExpandedSyntax

public bool ProtectedForForms { get; set; }

Property Value

Type: Boolean

ExpandedExamples

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.InsertBreak(BreakType.SectionBreakContinuous);
builder.Writeln("Section 2. Protected.");

// Section protection only works when document protection is turned and only editing in form fields is allowed
doc.Protect(ProtectionType.AllowOnlyFormFields);

// 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