Okay danke. Ich habe mir seine Funktion ReOpen kopiert.
Also ich hole mir im PostOpen das (BackEnd) Doc, mache meine Änderungen und rufe danach die Funktion ReOpen auf. Jetzt bekomme ich (wie auch teilweise bei meinen Versuchen) einen Stack Overflow. 10-20 Dokumente öffnen sich und werden sofort wieder geschlossen (Notes schiesst´s dabei manchmal auch ab!). Das ganze passiert jetzt in der Funktion ReOpen in der Zeile
-> Set docThis = uidoc.Document
Das ist die Funktion, die ich aufrufe, nachdem ich im BackEnd doc das RTI gelöscht und neu erstellt habe:
| Function ReOpen(docThis As NotesDocument) As Integer |
| Dim ws As New NotesUIWorkspace |
| Dim uidoc As NotesUIDocument |
| Dim dbThis As NotesDatabase |
| Dim unid As String |
| |
| ReOpen = 0 |
| Set dbThis = docThis.ParentDatabase |
| Call docThis.Save(True , True) |
| unid = docThis.UniversalID |
| docThis.SaveOptions = "0" |
| Set uidoc = ws.CurrentDocument |
| Call uidoc.Close |
| Set docThis = dbThis.GetDocumentByUNID(unid) |
| Set uidoc = ws.EditDocument(True , docThis) |
| ---> Set docThis = uidoc.Document |
| If docThis.HasItem("SaveOptions") Then |
| |
| docThis.RemoveItem("SaveOptions") |
| Call docThis.Save( True , True ) |
| End If |
| ReOpen = 1 |
| Print "Das Dokument wurde erneut geöffnet" |
| End Function |