Notesdocumentcollection order sorted

Is there a simple solution to sort the documents from a notesdocumentcollection instead of using the NotesViewEntryCollection class?

I would like to select documents in a view and then process this documents with an agent in the alphabtical sort order but notes does this in order of the creation date time stamp. i know that there is no standard function in notes if you use the notesdocumentcollection.

And how to get the selected documents only if i use the sorted NotesViewEntryCollection?

It would be great if somebody has an example for me for this issue.

Subject: notesdocumentcollection order sorted

I would use the the doccollection.putallinfolder method. Have a folder in your database sorted the way you need it and then reference that folder when calling it.

Something like:

Set DC = Lkup.GetAllDocumentsByKey(Key, True)

If DC.Count > 0 Then

Call DC.PutAllInFolder(“SortedFolder” )

End If

Then you can process the documents in that folder using getfirst and getnext

Don’t forget to call the removeallfromfolder when you are done

Subject: RE: notesdocumentcollection order sorted

Here’s a recent blog article on the subject;Don McNally: SnTT: Sorting a NotesDocumentCollection - Ascending *or* Descending

Subject: RE: notesdocumentcollection order sorted

hi frank,thank you for the input.

Subject: RE: notesdocumentcollection order sorted

tom,thank you for the idea. it work’s that way.