Close all docs in NotesDocumentsCollection

there is a scipt in the agent:

Call collecBreak.StampAll(“ManagerStatus”,uidoc.document.ManagerStatus(0))

		Call collecBreak.StampAll("BLManagerStatus",uidoc.document.BLManagerStatus(0))

		Call collecBreak.StampAll("NTGroupManagerStatus",uidoc.document.NTGroupManagerStatus(0))

		Call collecBreak.StampAll("NTGroupManagers",uidoc.document.NTGroupManagers)

		Call collecBreak.StampAll("NTGroupManagersLeft",uidoc.document.NTGroupManagersLeft)

		Call collecBreak.StampAll("Status",uidoc.document.Status(0))

that scipt opens every document in the collection and leave them open… how can I close all those documents?

Subject: Close all docs in NotesDocumentsCollection

How are u calling this part of the code ? Is it by clicking a button ? I mean does this happen in front end ?

Subject: Close all docs in NotesDocumentsCollection

I’m not following you. You have a NotesDocumentCollection, and you have a NotesUIDocument. You’re updating every document in the collection with fields from the UIdoc. Why/when are you opening every document in the collection?