Examples: Accessing session properties
- 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
- 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
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.