so, ich habe mal folgendes probiert:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim db2 As NotesDatabase
Dim doc As NotesDocument
Dim dc As NotesDocumentCollection
Set db = session.CurrentDatabase
Set db2 = New NotesDatabase (db.Server, "zieldb.nsf")
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument()
While Not(doc Is Nothing)
ergebnis = doc.Document.CopyToDatabase(db2)
Set doc = dc.GetNextDocument(doc)
Wend
Schade nur, dass die Zeile "ergebnis = doc.Document.CopyToDatabase(db2)" diesen Fehler hier bringt:
Object variable not set