Answer = Messagebox (“Die letzte Bearbeitung wurde nicht ordnungsgemäss beendet. Wollen Sie das Dokument freigeben?”, MB_YESNO, “Unlock?
If answer = 7 Then Continue = False End If Elseif doc.LockedBy (0) <> “” Then Messagebox (“Das Dokument ist schon in Bearbeitung bei ” + doc.lockedby(0)) continue = False End If Else ‘ EDIT -> READ Call source.reload () If Not doc.lockedby = “” Then doc.lockedby = “” doc.save True, False End If End If End Sub Sub Postmodechange(Source As Notesuidocument) Dim s As New notessession Dim doc As NotesDocument If source.EditMode = True Then ‘ READ -> EDIT Call Source.reload () Set doc = source.Document If doc.LockedBy (0) = “” Then doc.lockedby = s.COMMONUSERNAME If (False = doc.Save (False, False, True) ) Then Messagebox (“Das Dokument ist schon in Bearbeitung” ) doc.SaveOptions = “0” Call Source.close () Exit Sub End If doc.save True, False End If End If End Sub Sub Queryclose(Source As Notesuidocument, Continue As Variant) Dim uiw As New notesuiworkspace Dim doc As notesDocument Set doc = Source.Document If ( Source.EditMode ) And Not (Source.Isnewdoc)Then doc.LockedBy = “” doc.SaveOption