so vielleicht?
While Not Doc is Nothing
docB = doc
If..Bedingung...Then
Flag$="Löschen"
End if
Set doc = Collection.GetNextDocument(Doc)
if Flag$= "Löschen" Then
Call Collection.DeleteDocument(DocB)
End If
Wend
also das verschieben der Zeile Call... nachdem das nächste Doc in der Coll geholt wird?
@edit: @Performance, lese gerade Dein Posting während ich meine eigene Antwort abgefeuert hatte...ein Mann ein Gedanke...ich denke, so passt es. Thx :D
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim col As NotesDocumentCollection
Set docA = col.GetFirstDocument
While Not (docA Is Nothing)
Set docB = col.GetNextDocument (docA)
Call col.DeleteDocument (docA)
Set docA = docB
Wend
Könnte das gehen?
Gruß
- Jérôme