How to check if a word file has a password?

后端 未结 2 935
野趣味
野趣味 2020-12-20 08:48

I built a script that converts .doc files to .docx.

I have a problem that when the .doc file is password-protected, I can\'t a

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-20 09:35

    There is a technique outlined here. Essentially, you supply a fake password which files without a password will ignore; then you error-trap the ones that do require a password, and can skip them.

提交回复
热议问题