Notesdocumentcollection

Hi there.I have two notesdocumentcollections x and y and I want to copy documents from x to y based on certain conditions. It does not work as I have just dimmed y but I have used set x = view.GetallDocumentsByKey().

I have tried using notesviewentrycollections instead but I get the same problem.

I have got around this problem by copying docs to a folder first then to y. Is there a simpler way of doing this?

Thank you.

Subject: notesdocumentcollection

“y” is not a NotesDocumentCollection until you initialize it – Dim is not enough. You can initialize “y” to an empty collection by using getalldocumentsbykey with a known always-bad key.