LOTUSSCRIPT/COM/OLE CLASSES
The second time the script runs (and each time thereafter), UnprocessedDocuments returns those documents that UpdateProcessedDoc has not touched; for example, if three new documents have been added to the database and one existing document has been modified since the first time the agent ran, UnprocessedDocuments returns a collection of four documents.
Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection Dim doc As NotesDocument Set db = session.CurrentDatabase Set collection = db.UnprocessedDocuments Set doc = collection.GetFirstDocument() While Not(doc Is Nothing) Call session.UpdateProcessedDoc( doc ) Set doc = collection.GetNextDocument(doc) Wend End Sub
For more examples, see the UnprocessedDocuments property, the UnprocessedFTSearch method, or the UnprocessedSearch method, in NotesDatabase.
See Also