Ich wußte doch das sich das in der Hilfe stöbern mal lohnen würde *g*
Defined in
NotesDatabase
Data type
NotesDocumentCollection
UnprocessedDocuments returns the documents currently selected in the view. The script iterates over each document and, if the Approver item contains the current user's name, it sets the Approved item to "Yes."
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)
Set item = doc.GetFirstItem( "Approver" )
If item.Contains( session.UserName ) Then
doc.Approved = "Yes"
Call doc.Save( False, True )
End If
Set doc = collection.GetNextDocument(doc)
Wend
End Sub