CreateReplica problem - please help

I am trying to create a simple scheduled agent that will create replicas on another server if they do not exist already. Unfortunately, I am coming across many problems with this.

If I try to create a replica of the database the agent is running in, it gives me an “object variable not set”.

If I try to create replicas of all the nsf files in a given directory, it ignores most of them as already having a replica (even though they don’t) and falls over on other databases with the error message:

“Notes error: LookupHandle: null handle (server!!filename)”

Has anyone else had issues with Create Replica or does anyone have sample code they know works in a scheduled agent?

Thanks.

Subject: Resolved

If anyone is interested, which no-one seems to be, this is the resolution.

CreteReplica does not seem to work in a scheduled agent. However, if you create a scheduled agent that calls another agent using CreateReplica, it works ok.