Hier ein AgentenCode, der ausgewählte Dokumente ohne deletionStubs löscht ( das zeugs ist schon älter und ich habe nicht getestet, ob es das jetzt auch noch tut )
Declare Function W32_NSFNoteDelete Lib "nnotes.dll" Alias "NSFNoteDelete" _
( Byval hDb As Long, Byval NoteID As Long, Byval UpdateFlags As Integer ) As Integer
Declare Sub W32_OSPathNetConstruct Lib "nnotes.dll" Alias "OSPathNetConstruct" _
(Byval portName As String, Byval ServerName As String, Byval FileName As String, Byval retPathName As String)
Declare Function W32_NSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" ( Byval dbName As String, hdb As Long ) As Integer
Declare Function W32_NSFDbClose Lib "nnotes.dll" Alias "NSFDbClose" ( Byval hdb As Long ) As Integer
Sub Initialize
'######### NOTES STANDARD DEFINITIONS #############
Dim ses As New notessession ' one and only session
Dim ndb As notesdatabase ' current DB
Dim doc As notesdocument ' current document being processed:
Set ndb=ses.CurrentDatabase
Set doc = ndb.Unprocesseddocuments.getFirstDocument
Const MAXPATH=256
Const UPDATE_NOSTUB = &h0200
Dim path As String, noteid As Long, dbPath As String*MAXPATH, hdb As Long
dbPath = String$(MAXPATH, Chr(0))
noteID = Val("&h" &doc.Noteid)
W32_OSPathNetConstruct "",ndb.Server, ndb.FilePath, dbPath
W32_NSFDbOpen dbPath, hdb
If hdb=0 Then Exit Sub
Print "deleting... note= " ¬eid
W32_NSFNoteDelete hDb, noteid, UPDATE_NOSTUB
W32_NSFDbClose hdb
End Sub