Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uiview As NotesUIView
Dim view As NotesView
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
' Call doc.RemovePermanently(True)
Call doc.Remove(True)
Set uiview = ws.CurrentView
Set view = uiview.View
Call ws.viewrefresh()