Hello,
I’m trying to cycle through a notesDocumentCollection using the following:
l_oDoc = l_oDocCol.GetFirstDocument()
DO WHILE !ISNULL(l_oDoc)
l_oNextDoc = l_oDocCol.GetNextDocument(l_oDoc)
IF !l_oDoc.IsDeleted()
l_oDoc.removePermanently(.T.)
ENDIF
l_oDoc = l_oNextDoc
ENDDO
But, if l_oDoc is deleted, I get an error on this line:
l_oDocCol.GetNextDocument(l_oDoc)
Here’s the error message:
OLE IDispatch exception code 0 from NotesDocumentCollection: Argument has been deleted…
How can I get the next document when the current one is deleted?
Thanks.