PROGRAMMING DOMINO FOR WEB APPLICATIONS
Sub Initialize Dim s As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim context As NotesDocument Dim arg As String Set context = s.DocumentContext arg = s.DocumentContext.Query_String(0) p1 = Instr(arg, "&") If p1 = 0 Then Print "Need argument 'open' or 'closed'" Else arg = Lcase(Mid$(arg, p1 + 1)) If arg <> "open" And arg <> "closed" Then Print "Argument must be 'open' or 'closed'" End If End If Set db = s.CurrentDatabase Set dc = db.UnprocessedDocuments Set doc = dc.GetFirstDocument Do While Not(doc Is Nothing) doc.Status = arg Call doc.Save(False, True) Set doc = dc.GetNextDocument(doc) Loop Print "<SCRIPT LANGUAGE=JavaScript>" Print "alert(""Status changed to '" & arg & _ "' in all documents"")" Print "location.href = ""/Web+test.nsf/Main+View?OpenView""" Print "</SCRIPT>" End Sub