Examples: IsUIDocOpen property
This user sub checks the NotesDocument object that is passed to it and exits with a message if the object is based on a front-end document.
Sub UpdateSubject(doc As NotesDocument)
If doc.IsUIDocOpen Then
Messagebox _
"Can't do Subject update from front-end",, _
"No can do"
Exit Sub
End If
Call doc.ReplaceItemValue _
("Subject", doc.Subject(0) & "0")
Call doc.Save(True, False)
End Sub