例: LockHolders property (NotesDocument - LotusScript®)

次のビューアクションは、現在の文書のロック所有者を表示します。

Sub Click(Source As Button)
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Set db = session.CurrentDatabase
  
  REM Exit if locking is not enabled
  If Not db.IsDocumentLockingEnabled Then
    Print "Document locking not enabled"
    Exit Sub
  End If
  
  REM Get selected document
  Dim dc As NotesDocumentCollection
  Dim doc As NotesDocument
  Set dc = db.UnprocessedDocuments
  Set doc = dc.GetFirstDocument
  
  REM Display lock holders
  holders = doc.LockHolders
  If holders(0) = "" Then
    Messagebox "None",, "Lock holders"
  Else
    Forall h In holders
      msg$ = msg$ & h & Chr(13)
    End Forall
    Messagebox msg$,, "Lock holders"
  End If
End Sub