If there's no connection between the documents in the database and the e-mail you want to send, write the agent in LotusScript or Java and set it to run on "All documents in database." The agent will run once -- not once for each document. You can do whatever you want in the agent -- the UnprocessedDocuments collection will contain all the documents in the database, but you don't have to use this collection if you don't want to.
If you want to use the documents in the database (e.g., if each document contains a recipient e-mail address), but you want old documents as well as new or changed documents, you should still select "All documents in database." If you don't really want all of the documents, use the "Document Selection" tab of the Objects pane to enter a full-text query to restrict the documents to just those that meet certain criteria. You can instead use a SELECT statement (in a macro agent) or the NotesDatabase.Search method (in LotusScript), which is more efficient if your database does not contain a full-text index.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on Lotus Notes Domino Agents
Related Q&A from Andre Guirard
Learn how you can use LotusScript and OLE to create and populate Microsoft Excel spreadsheets, as well as a little bit about Lotus Symphony. Continue Reading
Discover options you can use if you'd like external users to be able to access a workflow-based Notes Domino application through different ... Continue Reading
Learn why you may receive the error message: "Illegal circular use: Audit Trail" when trying to open Lotus Notes documents that use copied forms. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.