如果该属性值为 True,则 Microsoft Word 为密码保护的文档的文件属性加密。Boolean 类型,只读。
expression.PasswordEncryptionFileProperties
expression 必需。该表达式返回“应用于”列表中的一个对象。
使用 SetPasswordEncryptionOptions 方法指定 Word 是否将密码保护的文档的文件属性加密。
如果未对密码保护的文档的文件属性加密,本示例将设置密码加密选项。
Sub PasswordSettings()
With ActiveDocument
If .PasswordEncryptionFileProperties = False Then
.SetPasswordEncryptionOptions _
PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
PasswordEncryptionAlgorithm:="RC4", _
PasswordEncryptionKeyLength:=56, _
PasswordEncryptionFileProperties:=True
End If
End With
End Sub