LOTUSSCRIPT/COM/OLE CLASSES


Examples: ProtectUsers property
This script toggles protection for the form users field.

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"

See Also