例: ProtectUsers property

次のスクリプトは、フォームユーザーのフィールドの保護をユーザーの指定に応じて切り替えます。

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
formNameIn = Lcase(Inputbox("Name of form?"))
Forall form In db.Forms
  If Lcase(form.Name) = formNameIn Then
    If form.ProtectUsers Then
      form.ProtectUsers = False
      Messagebox "ProtectUsers is set for " _
      & form.Name
    Else
      form.Protectusers = True
      Messagebox "ProtectUsers is not set for " _
      & form.Name
    End If
    Exit Sub
  End If
End Forall
Messagebox "The form """ & formNameIn & """ does not exist"