Sorry, ich hatte da einen Fehler in meiner Formel oben
:
Sub Click(Source As Button)
Dim nuiw As New NotesUIWorkspace
Dim ns As New NotesSession
Dim db As NotesDatabase
Set db = ns.CurrentDatabase
Dim dc As NotesDocumentCollection
Dim nextdoc As NotesDocument
Dim doc As NotesDocument
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Do While Not (doc Is Nothing)
Set nextdoc = dc.GetNextDocument(doc)
Call doc.RemovePermanently(True)
Set doc = nextdoc
Loop
Call nuiw.ViewRefresh
End Sub