Examples: IsCurrentAccessPublicWriter property (NotesDatabase - LotusScript®)

This agent opens a database in the workspace if the user has public writer access to it.

Sub Initialize
  Dim session As New NotesSession
  Dim ws As New  NotesUIWorkspace
  Dim db As NotesDatabase
  server$ = "Snapper"
  file$ = "bob\Stream"
  Set db = session.GetDatabase(server$, file$)
  If Not db.IsOpen Then
    Messagebox "Database does not exist",, _
    server$ & "\\" & file$
    Exit Sub
  End If
  If db.IsCurrentAccessPublicWriter Then
    Call ws.OpenDatabase(server$, file$)
  Else
    Messagebox "You are not a public writer",, _
    server$ & "\\" & file$
  End If
End Sub