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();