Hi,
I would like to know how I can set a password for a document so that the document can’t be opened without the password.
regards,
Devid.
Hi,
Hi Devid,
Document doc = new Document();<o:p></o:p>
DocSaveOptions options = new DocSaveOptions(SaveFormat.Doc);<o:p></o:p>
options.Password = “test”;
doc.Protect(ProtectionType.ReadOnly, “passoword”);
<o:p></o:p>doc.Save(MyDir + “AsposeOut.doc”, options); Document doc = new Document(); OoxmlSaveOptions options = new OoxmlSaveOptions(SaveFormat.Docx); options.Password = "test"; doc.Protect(ProtectionType.ReadOnly, "passoword"); doc.Save(MyDir + "AsposeOut.docx",
options);
Hi tahir.manzoor,
Hi Devid,