Examples: Server property (NotesDirectory - LotusScript®)

This button displays the name of the server being used for lookups. The form that contains this button contains other buttons that do lookups.

Dim session As NotesSession
Dim directory As NotesDirectory
Sub Initialize
	Set session = New NotesSession
	Set directory = session.GetDirectory("myserver/Acme")
End Sub

Sub Click(Source As Button)
	Dim svr As String
	svr = directory.Server
	If svr = "" Then
		svr = "Local"
	End If
	Msgbox svr,, "Server"
End Sub