grab a document from a database ( shorten your code )
Public Function GetDocFromDb( db As NotesDatabase, viewName As String, key() As Variant, exact As Boolean ) As NotesDocument
‘ returns the first doc based on a search key
‘ written by Mike Mortin
Dim view As NotesView ‘ get the view
Set view = db.GetView(viewName) ‘ get the doc from the key
Set GetDocFromDb = view.GetDocumentByKey(key, exact)
End Function
Original source : http://www.openntf.org/projects/codebin/codebin.ns…