Function all_desc(root As notesDocument, b_error As Boolean) As NotesdocumentCollection
On Error Goto ErrLab
Dim col As NotesDocumentCollection
Dim children As NotesdocumentCollection
Dim doc As Notesdocument, push As NotesDocument
Dim k%, m%
Set children = root.Responses
If Not (children Is Nothing) Then
Set doc = children.getFirstDocument
Do Until doc Is Nothing
If Not doc.IsDeleted And doc.IsValid Then
Set col = all_desc(doc, b_error)
If Not (col Is Nothing) Then
Set push = col.GetFirstDocument
Do Until push Is Nothing
If Not push.IsDeleted And push.IsValid Then
On Error 4469 Resume Next
Call children.AddDocument(push)
On Error Goto ErrLab
End If
Set push = col.getNextDocument(push)
Loop
End If
End If
Set doc = children.getNextDocument(doc)
Loop
End If
Set all_desc = children
Exit Function
ErrLab:
b_error = True
Msgbox "Error " + Cstr(Err) + " at line " + Cstr(Erl)
Exit Function
End Function