Silly me… After tinkering with the code a bit more, I finally found what was causing the problem… =)
P.S. How do I delete this post?
Hi!
I have an agent which copies documents from one database to another. It worked fine when I tested it on databases residing in my (local) machine. My problem arose when I had to copy documents from our production server to our test server.
Below is the code for my agent:
Dim session As New NotesSession
Dim oldSIR As NotesDatabase
Dim newSIR As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set oldSIR = session.CurrentDatabase
Set newSIR = New NotesDatabase _
("", "DOMINO05A\AppsTest\SIR for WDES.nsf")
Set dc = oldSIR.UnprocessedDocuments
Set doc = dc.GetFirstDocument()
While Not(doc Is Nothing)
Call doc.CopyToDatabase(newSIR)
Set doc = dc.GetNextDocument(doc)
Wend
The database (CurrentDatabase) owning this agent resides in server Domino03A/PAL. The database I want to copy the documents to resides in server DOMINO05A/DOMTEST.
When I run the agent above, I get the message “Database DOMINO05A\AppsTest\SIR for WDES.nsf has not been opened yet.”
Please, anybody, point out what I did wrong or what I failed to do.
Thank you.