I am trying to process new documents using UnprocessedDocuments collection. The UpdateProcessedDoc and UpdateAll methods do not appear to work
For test purposes I have pared the agent down to this:
Sub x
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
Messagebox collection.Count
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Call session.UpdateProcessedDoc( doc )
Set doc = collection.GetNextDocument(doc)
Wend
’ I have also tried the following line (instead of the 5 lines above)
’ Call Collection.UpdateAll
End Sub
No matter how I run the agent (or how many times) I get the total number of docs in the db returned.
What am I doing wrong?