Hi Leute,
cih möchte gerne aus einer Action das geöffnete Dokument als kopie 1:1
in der Datenbank ablegen.
Hierzu nehme ich folgenden Code:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument, doc2 As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set db = session.CurrentDatabase
Set doc2 = New NotesDocument(db)
Call doc.CopyAllItems(doc2)
Call doc2.Save(True, False)
End Sub
Aber wenn die die Aktion ausführe erscheint mir nachher nicht das Dokument als Kopie.
Woran kann dies liegen?
Gruss Jörg
Super klappt, Thank.
So sieht der Code nun aus Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument, doc2 As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set db = session.CurrentDatabase
Set doc2 = New NotesDocument(db)
Call doc.CopyAllItems(doc2)
doc2.titel = "Copy: " & doc.titel (0)
Call doc2.Save(True, False)
End Sub
Gruss Jörg