Subject: Agent won’t run. No documents are selected. Help!
Hi Lynda
Yep - you missed the agent properties.
You are using the NotesDatabase.AllDocuments (Set dc = oldSIR.AllDocuments) which means that you dont need the agent it self to select any document.
In the agent properties, in the “Basics” page, in the section “Runtime”, select the target to “None”.
If you need to get the selection from the agent, you sould use the target “All Documents in database” and make a document selection as you have descriped.
To optain these documents, use the NotesDatabase.UnprocessedDocuments, changing the line “Set dc = oldSIR.AllDocuments” to “Set dc = oldSIR.UnprocessedDocuments”.