0
我會看到各種選項來強制執行保護,但沒有任何密碼。我會怎麼做?如何在Java中強制執行MS-Word的密碼保護?
File file = new File(fileName);
FileInputStream fis = new FileInputStream(file.getAbsolutePath());
XWPFDocument document = new XWPFDocument(fis);
document.enforceCommentsProtection();
document.enforceFillingFormsProtection();
document.enforceReadonlyProtection();
document.enforceTrackedChangesProtection();
document.enforceUpdateFields();
document.removeProtectionEnforcement();