DocumentBase.PasswordEncryptionFileProperties Özellik
Microsoft Office Word dosya özellikleri parola korumalı belgeler için şifreler olup olmadığını gösteren değeri alır.
Ad alanı: Microsoft.Office.Tools.Word
Derleme: Microsoft.Office.Tools.Word.v4.0.Utilities (Microsoft.Office.Tools.Word.v4.0.Utilities.dll içinde)
Sözdizimi
'Bildirim
Public ReadOnly Property PasswordEncryptionFileProperties As Boolean
public bool PasswordEncryptionFileProperties { get; }
Özellik Değeri
Tür: System.Boolean
true Microsoft Office Word dosya özellikleri parola korumalı belgeler için şifreler Aksi halde, false.
Notlar
Kullanım SetPasswordEncryptionOptions Word parola korumalı belgeler için dosya özelliklerini şifreler olup olmadığını belirlemek için yöntem.
Örnekler
Aşağıdaki kod örneğinde parola korumalı belgeler için dosya özelliklerini şifrelenmemişse parola şifreleme seçeneklerini ayarlar.Bu örneği kullanmak için çalıştırın ThisDocument bir belge düzeyi projesinde sınıf.
Private Sub DocumentPasswordEncryptionFileProperties()
If Me.PasswordEncryptionFileProperties = False Then
Dim PasswordEncryptionProvider As String = _
"Microsoft RSA SChannel Cryptographic Provider"
Dim PasswordEncryptionAlgorithm As String = "RC4"
Dim PasswordEncryptionKeyLength As Integer = 56
Dim PasswordEncryptionFileProperties As Object = True
Me.SetPasswordEncryptionOptions(PasswordEncryptionProvider, PasswordEncryptionAlgorithm, PasswordEncryptionKeyLength, PasswordEncryptionFileProperties)
End If
End Sub
private void DocumentPasswordEncryptionFileProperties()
{
if (this.PasswordEncryptionFileProperties == false)
{
string PasswordEncryptionProvider = "Microsoft RSA SChannel Cryptographic Provider";
string PasswordEncryptionAlgorithm = "RC4";
int PasswordEncryptionKeyLength = 56;
object PasswordEncryptionFileProperties = true;
this.SetPasswordEncryptionOptions(PasswordEncryptionProvider,
PasswordEncryptionAlgorithm, PasswordEncryptionKeyLength,
ref PasswordEncryptionFileProperties);
}
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.