what is the command/script to use to copy documents in a view from one database to a new database?
thanks in advance
what is the command/script to use to copy documents in a view from one database to a new database?
thanks in advance
Subject: to copy documents in view from a database to new database
There are many ways to copy docs in LotusScript.Here is one:
'DB to hold Copied Doc
Dim DBName As New NotesDatabase( “”, “” )
’ Current DB with doc in view to copy.
Dim db As NotesDatabase
Dim doc As NotesDocument
’ Check to assure DBName is opened
replid = “80256DFA0030EE5C”
If Not DBName.OpenByReplicaID( db.Server, replid ) Then
Exit Sub
End If
Set db = session.CurrentDatabase
Set view = db.GetView(“(CopyDocsView)”)
Set doc = view.GetFirstDocument
Here you can cycle thru the docs or just get the one you want.
Call doc.CopyToDatabase(DBName)
If this is for an archive agent, I can suggest you search on the web for that code. Ex. http://searchdomino.techtarget.com/