Domino Code Fragment

Code Name*
NotesUIDocument property, EditMode
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.220.137.164
Description*
Forces the on screen document into edit mode, using the NotesUIDocument property, EditMode .
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
To force the on screen document into edit mode, use the NotesUIDocument property, EditMode . When set to True , a document is in edit mode, when false, the document is in read mode. To force a document into edit mode all the time, you could place this line of code in the PostOpen event of a form.
Files/Graphics attachments (if applicable): Code:


Syntax
notesuidocument.EditMode = True

The example below toggles the on screen document between edit and read mode.

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
'Declare workspace as type NotesUIWorkspace
Dim uidoc As NotesUIDocument
'Declare uidoc as type NotesUIDocument
Set uidoc = workspace.CurrentDocument
'Set uidoc to the on screen document
If uidoc.EditMode Then
'Check to see if document is in edit mode. If it is...
uidoc.EditMode = False
'Force the document into read mode
Else
'Otherwise
uidoc.EditMode = True
'Force the document into edit mode
End If 'End the If statement

End Sub


Click here to view the example.