Examples: IsEncrypted property (NotesDocument - LotusScript®)

This agent displays whether the current document is encrypted.

Sub Initialize
  Dim session As New Notessession
  Dim db As Notesdatabase
  Set db = session.Currentdatabase
  Dim dc As Notesdocumentcollection
  Set dc = db.Unprocesseddocuments
  Dim doc As notesdocument
  Set doc = dc.Getfirstdocument
  If doc.IsEncrypted Then
    Messagebox "Encrypted",, doc.Subject(0)
  Else
    Messagebox "Not encrypted",, doc.Subject(0)
  End If
End Sub