SectionProtectedForForms Property |
Namespace: Aspose.Words
// Create a blank document 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; builder.Document.Save(ArtifactsDir + "Section.Protect.doc");