• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2127
  • Last Modified:

LotusScript ... doc opens in edit mode; I need read mode ... how?

Using the code below, my document in opens in Edit mode.  I want it to open in read mode.  What changes do I need to make?

Sub Initialize
     On Error Resume Next
     Dim s As New NotesSession
     Dim ws As New NotesUIWorkspace
     Dim db As NotesDatabase
     Dim view As NotesView
     Dim doc As NotesDocument
     Dim uidoc As NotesUIDocument
     Set db = s.CurrentDatabase
     Set view = db.GetView("(LU_ITAdminDocs)")
     Set doc = view.GetDocumentByKey("GURULIST",True)
     Call ws.SetTargetFrame("frITright")
     Set uidoc = ws.EditDocument(True,doc)
End Sub
1 Solution
Set uidoc = ws.EditDocument(False , doc)

This should do the trick for you !

Editdocument in your script should be changed to this

Set uidoc = ws.EditDocument(False,doc,True)

The Third parameter instructs the system to open the doc in read-only mode. Meaning that the user later cannot switch to edit mode.

SandraEAuthor Commented:
Arunkumar, you got here first.  Thanks very much ... this was exactly the information I needed.

HemanthaKumar, thank you for the extra parameter -- I'm sure I'll be using it soon.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now