ub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim id$
Set db=s.Currentdatabase
Set nc = db.CreateNoteCollection(False)
nc.Selectalldesignelements(True)
nc.Selectdocuments=False
nc.Selectionformula=|$Flags="~C4g" & $FlagsExt="w" & !@Contains($TITLE;"WEB-INF/") & $PublicAccess!="1"|
Call nc.Buildcollection()
Print nc.Count
id=nc.Getfirstnoteid()
While id<>""
Set doc=db.Getdocumentbyid(id)
Print doc.Getitemvalue("$TITLE")(0)
Call doc.ReplaceItemValue("$PublicAccess","1")
Call doc.Sign()
Call doc.Save(True,False)
id=nc.Getnextnoteid(id)
Wend
End Sub