Free Support Forum - aspose.com

Creating exceptions to readonly documents

Is it possible to create exception/editable sections to a read only protected document using the ASPOSE API? If so, please show me a .NET code example.

Thanks,
Ken

Hi

Thanks for your request. Please create what you want using MSWord and attach the created document here. I will investigate it and try to help you.

Also see the following code. May be it will help you.

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.CurrentSection.ProtectedForForms = true;

builder.Write("Protected text");

builder.InsertBreak(BreakType.SectionBreakContinuous);

builder.CurrentSection.ProtectedForForms = false;

builder.Write("Editable text");

doc.Protect(ProtectionType.AllowOnlyFormFields);

doc.Save(@"196_95012_kpayson\out.doc");

Best regards.