This agent makes it easy to find orphan documents. It runs through all documents in the database and tests each response doc it finds to make sure its parent can be located. If an orphan is found the document is placed in a folder called Orphan for easy retrieval.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
Dim Session As New NotesSession
Dim CurDB As NotesDatabase
Dim DocColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim Parent As NotesDocument
Set CurDB = Session.CurrentDatabase
Set DocColl = CurDB.AllDocuments
Set Doc = DocColl.GetFirstDocument
While Not(Doc Is Nothing)
If Doc.IsResponse Then
On Error Goto Orphan
Set Parent = CurDB.GetDocumentByUNID(Doc.ParentDocumentUNID)
Set Doc = DocColl.GetNextDocument(Doc)