Agent to automatically creat a group list in names.nsf

I would like to gather names from one database using an agent running from a button. A user would go in and select a bunch of documents in a view. Then click a button and this would cause, the names from the selected documents to be copied over to a group document in the peson’s personal name and address book. Is this possible? Does anyone have any ideas? Greatly appreciated.

Thank you,

Dawn

Subject: Agent to automatically creat a group list in names.nsf

Yes, it’s possible. Use db.unprocesseddocuments in your button to get a handle on the NotesDocumentCollection of selected documents. Create a new group document in the local names.nsf, and set a new NotesItem called Members. Loop through the document collection, using NotesItem.AppendToTextList to add each name to the list. Then save the new group document.