Get Your Enterprise NAB from the current database ( shorten your code )
Function GetEnterpriseNAB( default As String ) As NotesDatabase
‘ returns the NAB from the server the current Db is on
‘ posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/808CDC4680D8BF37862574EF006EDD01
‘ written by Mike Mortin
Dim s As New NotesSession
Dim db As NotesDatabase
Dim server As String
Dim nname As NotesName ‘ set the default
If default = "" Then default = "Admin01/Operations/CA" ‘ get our parent server to get the NAB
Set db = s.CurrentDatabase
Set nname = New NotesName(db.Server)
server = nname.Common ‘ now, use default server if we are local
If server = "" Then server = default ‘ finally, grab names.nsf from that server
Set GetEnterpriseNAB = New NotesDatabase(server, "names.nsf")
End Function
Original source : http://www.openntf.org/projects/codebin/codebin.ns…
Добавить комментарий