.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: AddressBooks property
1. This script gets each address book, opens it, and prints its title in a dialog box.
Dim session As New NotesSession
Dim books As Variant
books = session.AddressBooks
Forall b In books
Call b.Open( "", "" )
Messagebox( b.Title )
End Forall
2. This action script finds an employee's phone number by looking it up in an Address Book. After the user enters the last name of the person, the script searches for the name in the People view of every available Domino Directory. If a Person document is found that matches the name, the script displays the person's phone number, from the OfficePhoneNumber item on the Person document. If a matching Person document is not found in any Domino Directory, the script displays an error message.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim books As Variant
Dim view As NotesView
Dim doc As NotesDocument
Dim done As Variant
Dim person As String
books = session.AddressBooks
done = False
person = Inputbox$ _
( "Enter the last name of the person: ", "Last name" )
Forall b In books
' check every Domino Directory,
' unless we're already done
If ( b.IsPublicAddressBook ) And ( Not done ) Then
Call b.Open( "", "" )
' look up person's last name
' in People view of address book
Set view = b.GetView( "People" )
Set doc = view.GetDocumentByKey( person )
' if person is found, display the phone number item
' from the Person document
If Not ( doc Is Nothing ) Then
Messagebox( "Phone for " + person _
+ " is " + doc.OfficePhoneNumber( 0 ) )
done = True
End If
End If
End Forall
' if done is still False, the person wasn't found
If Not done Then
Messagebox _
( "Sorry, unable to locate person's name." )
End If
End Sub
See Also
AddressBooks property
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents