Hallo Alle Zusammen,
habe da mal wieder ein Problem und bräuchte eure Fachmännische Hilfe.
Folgendes:
Es gibt 2 Dokumente (doc und doc2)
Folgende Relevante Felder
Titel (Dialogliste)
Link (RichtTextFeld)
Das doc kann aus einer Ansicht(view) ausgewählt werden und wenn man nun auf einen Button klickt soll eine Dokumentenverknüpfung zu dem doc2 in das Feld Link erstellt werden. Der angehängt Code läuft ohne Probleme durch, jedoch wird weder die Verknüpfung, noch die, testhalber eingefügte, textzeile eingefügt.
Ich hoffe Ihr könnt mir helfen.
| Sub Click(Source As Button) |
| Dim workspace As New NotesUIWorkspace |
| Dim session As New NotesSession |
| Dim uidoc As NotesUIDocument |
| Dim doc As NotesDocument |
| Dim doc2 As NotesDocument |
| Dim db As NotesDatabase |
| |
| Set uidoc = workspace.CurrentDocument |
| Set db = session.CurrentDatabase |
| Set doc = uidoc.Document |
| |
| |
| Dim view As NotesView |
| Set view = db.GetView("aView") |
| Set doc2 = view.GetDocumentByKey(doc.Titel(0)) |
| |
| Set Link= New NotesRichTextItem(doc,"Link" ) |
| doc.RemoveItem("Link") |
| |
| Set Link= New NotesRichTextItem(doc,"Link" ) |
| Call Link.AppendDocLink(doc2,"TEST" ) |
| Call Link.AppendText("TEST TEST TEST") |
| |
| doc.saveoptions = "0" |
| Call uidoc.Save |
| Call uidoc.Close |
| |
| Call workspace.EditDocument(True,doc) |
| |
| |
| End Sub |