Examples: TrustedOnly property

This button toggles the searching of trusted directories 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 msg As String
	If directory.TrustedOnly Then
		directory.TrustedOnly = False
		msg = "Lookups will search all directories"
	Else
		directory.TrustedOnly= True
		msg = "Lookups will search only directories containing trusted information"
	End If
	Msgbox msg,, "Trusted only?"
End Sub