例: EncryptionKeys property

  1. 次のスクリプトは文書の暗号キーを取得します。例えば、文書が Confidential キーと Classified キーで暗号化されているとき、keys (0) は「Confidential Key」を keys (1) は「Classified Key」を示します。
    Dim doc As NotesDocument
    Dim keys As Variant
    '...set value of doc...
    keys = doc.EncryptionKeys
  2. 次のスクリプトは、2 つの暗号キー Top Secret と Medium Secret で文書のすべてのアイテムを暗号化します。
    Dim doc As NotesDocument
    Dim item As NotesItem
    Dim keys( 1 To 2 ) As String
    '...set value of doc...
    Forall i In doc.Items
      i.IsEncrypted = True
    End Forall
    keys( 1 ) = "Top Secret"
    keys( 2 ) = "Medium Secret"
    doc.EncryptionKeys = keys
    Call doc.Encrypt
    Call doc.Save( True, True )