Copy A View From One Db To Another
Here is a click function that will allow you to copy a view ("test") in the
current database to another database ("copydb.nsf") using LotusScript.
Dim sess as New NotesSession
Dim db as NotesDatabase, db2 as NotesDatabase
Dim view as NotesView
Dim viewDoc as NotesDocument, viewDoc2 as NotesDocument
Set db = sess.CurrentDatabase
Set view = db.Getview("test")
viewid = view.UniversalID
viewDoc = db.GetDocumentByUNID(viewid)
Set db2 = sess.GetDatabase("", "copydb.nsf")
Set viewDoc2 = viewDoc.CopyToDatabase(db2)
Since design elements of a database (ie: views, forms, etc) are actually
documents, all you need to do is get the UNID and copy it as a regular
document.