How to keep NotesDocument.CopyAllItems under control April 8, 2008
Posted by Jörg Michael in Notes and DominoNow that I have your attention, I can tell you that CopyAllItems is innocent. You just need to be aware of how it works.
I recently came across an application that - for reasons I still don't understand - had a database PostOpen script that would grab your calendar profile from your mail file and .copyallitems to your personal profile document in the other application.
Then some users started getting error messages. Turns out that copyallitems copies all items, as you would expect. Even if the other document already contains items with the same names. So there were mutiple copies of all the items in the profile document. When that happens, the problem is that you will only have access to the first item with that name. Which, after a few changes to that item, is not exactly what you want. Notes doesn't have a problem with multiple items of the same name. It's the formula and Lotusscript APIs that can't deal with it. I understand the C(++) API can handle it.
So, to sum this up: There's nothing wrong with using .copyallitems. Just make sure that the destination document doesn't already have items with the same names.