Document.PasswordEncryptionFileProperties 属性 (Word)
如此 如果 Microsoft Word 对受密码保护的文档的文件属性进行加密。 只读 Boolean。
语法
expression。 PasswordEncryptionFileProperties
表达 一个代表 Document 对象的变量。
备注
使用 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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈