Sub StampAllDescendants(pdoc As NotesDocument, resps As notesdocumentcollection)
Dim subresps As notesdocumentcollection
Dim rdoc As NotesDocument
Set rdoc = resps.Getfirstdocument()
Do
'stamp this record
rdoc.FieldA = pdoc.FieldA(0)
rdoc.FieldB = pdoc.FieldB(0)
rdoc.FieldC = pdoc.FieldC(0)
Call rdoc.save(True,True)
'loop thru its responses
Set subresps = rdoc.Responses
If subresps.count > 0 Then Call StampAllDescendants(pdoc,subresps)
Set rdoc = resps.Getnextdocument(rdoc)
Loop Until rdoc Is nothing
End Sub