SetPasswordEncryptionOptions Method
TOC
Collapse the table of content
Expand the table of content

Document.SetPasswordEncryptionOptions Method (String, String, Int32, Object)

 

Sets the options Microsoft Office Word uses for encrypting documents with passwords.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

void SetPasswordEncryptionOptions(
	string PasswordEncryptionProvider,
	string PasswordEncryptionAlgorithm,
	int PasswordEncryptionKeyLength,
	ref object PasswordEncryptionFileProperties
)

Parameters

PasswordEncryptionProvider
Type: System.String

The name of the encryption provider.

PasswordEncryptionAlgorithm
Type: System.String

The name of the encryption algorithm. Word supports stream-encrypted algorithms.

PasswordEncryptionKeyLength
Type: System.Int32

The encryption key length. Must be a multiple of 8, starting at 40.

PasswordEncryptionFileProperties
Type: System.Object

true for Word to encrypt file properties. Default is true.

For enhanced security, do not use Weak Encryption (XOR) (also called "OfficeXor") or "Office97/2000 Compatible" (also called "OfficeStandard") algorithms.

Return to top
Show:
© 2016 Microsoft