I applied encryption password using : Encrypt a Document in C#|Aspose.Words for .NET but now if I want to remove the password programatically it doesn’t happen.
Can you help me with that?
@sujaiswal You can simply save the document without password to save the document as not encrypted. For example see the following code:
// Generate some dummy document
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Hello World!!!");
// Encrypt the docuemnt with password.
OoxmlSaveOptions opt = new OoxmlSaveOptions();
opt.Password= "password";
doc.Save(@"C:\Temp\out.docx", opt);
// Open encrypted document and save it as not encrypted.
Document doc1 = new Document(@"C:\Temp\out.docx", new LoadOptions() { Password = "password" });
doc1.Save(@"C:\Temp\unprotected.docx");
Got it, Thanks for the reply.