Hi.,If there are 1800 documents.it will not take much time. This also depends on the type of data you are copying or may be the coding is going into infinite loop.
You can try debugging this by keeping the print of the count to track the time taken to copy two docs into one doc.
I agree with Naive User.In your code put a “Print” statement, eg:Print "Creating Doc - " + Cstr(cnt)
Put this inside your loop so it prints each time it creates a new doc.
This will display the count in the lotus notes Status bar, so you can see it physically going through each doc. Possibly put some more information in there like document name. This way you will be able to identify if it is getting stuck on one doc in particular.
Again, I agree as well. However, if you are going to somehow put this code into a background agent, you might not want to do a print statement for each document, as it will post 1800 lines to your log.nsf file, which might be counterproductive. You could instead do something like:
Another thing you could do would be to set up a time counting function, so after it runs, it will tell you how long the agent took. Search the forum for code snippets by searching for “timedifference”