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

另请参阅

Document 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。