Issue:
Need to copy a view from application / database to a target application.
Solution:
Following is LotusScript code snippet that copies a view design to an another target application.
Dim sDb as NotesDatabase ' source app
Dim tDb as NotesDatabase ' target app
Dim sV as NotesView ' source (template) view to copy to target app
Dim tV as NotesView ' target new view to create from sV
Set sDb = s.Currentdatabase
Set tDb = s.GetDatabase(svrnm, dbnm, False)
If Not (tDB.IsOpen) Then
Print "(MyFunction) Error: Unable to open target application."
Exit Function
End If
' get source and copy
Set sV = sDb.GetView("MyView")
Set tV = tDb.Createview("MyView", , sV)
previous page
|