Ciclare su una vista Notes cancellandone i documenti.
Il problema che mi hanno insegnato a risolvere è il seguente: ho una vista su Notes, e devo ciclarne tutti i documenti. Man mano che li passo devo cancellarli, fino a rimanere con la vista vuota.
L’ho dovuto fare in visual basic 6…
Dim Sessione As NotesSession
Dim db As NotesDatabase
Dim dbPDOC As NotesDatabase 'Il database progect.doc
Dim view As NotesView
Dim doc As NotesDocument
Dim docTmp As NotesDocument
Set Sessione = New NotesSession
Call Sessione.Initialize("la mia password notes")
Set db = Sessione.GetDatabase("il mio server", "il mio database", False)
If db Is Nothing Then
...che fine ha fatto il database?
End If
If db.IsOpen Then
Set view = dbGestOrdini.GetView("la mia vista")
Set doc = view.GetFirstDocument()
While Not doc Is Nothing
Set docTmp = docWorld
Set doc = view.GetNextDocument(doc)
...
lavoro il documento docNuovo
...
docTmp.Remove True
Wend
End If
Leave a Reply