... ich hatte die Probleme auch schon in Verbindung mit uidoc.Refresh und uidoc.Save().
Mein Konstrukt zieht das aktuelle Dokument über eine Verzweigung:
sCaret = Source.CaretNoteID ' Get the CaretNoteID ...
If sCaret = "0" Then Goto ee ' ... - exit if it does not point at a document
Set dbThis = session.CurrentDatabase
If ws.CurrentDocument Is Nothing Then
Set docThis = dbThis.GetDocumentByID( sCaret )
Else
Set uidoc = ws.CurrentDocument
Set docThis = uidoc.Document
' Check EditMode and switch to edit mode
bEdit = True
If Not uidoc.EditMode Then
uidoc.EditMode = True
End If
End If
... den Speicherprozess verzweige ich dann wieder:
If uidoc Is Nothing Then
Call docThis.Save( True , True )
Else
Call uidoc.Save
End If
... damit funktioniert es bei mir - wobei die Sprungmarke ee bei mir das Exit Function ansteuert - mit Basic und Eclipse Version 8.5.2