Hi, ich habe hier ein Script gefunden , welches mir ein Antwortdokument erstellt:
Sub Click(Source As Button)
'Constants for this procedure
Const FORMNAME_RESPONSE$ = "dokument_files"
Const ERR_NODOCSEL_TITLE$ = "Error: No document selected"
Const ERR_NODOCSEL_MSG$ = "You need to select a document to create a response document of it."
On Error Goto ErrorHandler 'Of course we trap errors
'The dim section
Dim uiws As New NotesUIWorkspace
Dim uidocNew As NotesUIDocument
Dim session As New NotesSession
Dim db As NotesDatabase
Dim docSel As NotesDocument
Dim docNew As NotesDocument
'We need the current database
Set db = session.CurrentDatabase
'Get current document as NotesDocument object
If Not uiws.CurrentDocument Is Nothing Then
Set docSel = uiws.CurrentDocument.Document 'Document opened in form
Elseif Not session.DocumentContext Is Nothing Then
Set docSel = session.DocumentContext 'Document selected in view
End If
If docSel Is Nothing Then 'User did not select a document
Msgbox ERR_NODOCSEL_MSG, 48, ERR_NODOCSEL_TITLE
Goto GoOut
End If
'Create new backend response document
Set docNew = db.CreateDocument
Call docNew.ReplaceItemValue("form", FORMNAME_RESPONSE)
Call docNew.MakeResponse(docSel)
'This is necessary since we use one form for both main and response documents
Call docNew.ReplaceItemValue("$VersionOpt","1")
'Finally, open new document in the frontend
Call uiws.EditDocument(True, docNew,False)
GoOut:
Exit Sub
ErrorHandler:
' ErrorMsg
' Your error sub. See this AtNotes thread for further information: http://www.atnotes.de/index.php?topic=11980.0
Resume GoOut
End Sub
Leider habe ich nun das Problem das es zwar im front gespeichert werden kann,
ich dies aber gerne im Backend gespeichert brauche.
Bloß wie stelle ich dies an????
Gruß Jörg