LOTUSSCRIPT/COM/OLE CLASSES
Examples: Accessing session properties
1. This agent example displays the session properties.
Sub Initialize
Dim session As New NotesSession
Dim agent As NotesAgent
Dim db As NotesDatabase
Dim international As NotesInternational
Set agent = session.CurrentAgent
Messagebox "Name of agent = " & agent.Name
Set db = session.CurrentDatabase
Messagebox "Title of database = " & db.Title
Messagebox "Effective user name = " _
& session.EffectiveUserName
Messagebox "User name = " & session.UserName
Messagebox "Common user name = " _
& session.CommonUserName
If session.IsOnServer Then
Messagebox "Running on server"
Else
Messagebox "Running on workstation"
End If
Messagebox "Notes version = " _
& session.NotesVersion
Messagebox "Notes build version = " _
& session.NotesBuildVersion
Messagebox "Platform = " & session.Platform
Set international = session.International
Messagebox "Currency symbol = " _
& international.CurrencySymbol
End Sub
2. This agent example displays the title and path name of each Address Book.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
addressBooks = session.AddressBooks
Forall addressBook In addressBooks
Set db = addressBook
Call db.Open("", "")
Messagebox db.Title & Chr(10) _
& "(" & Ucase(db.FilePath) & ")"
End Forall
End Sub
See Also
Accessing session properties
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary