Domino 9 und frühere Versionen > ND8: Entwicklung

Body Feld über Schaltflächenformel füllen

<< < (2/2)

mweitzel:
Hallo noch einmal,

das Script läuft nun fast perfekt. Eine Kleinigkeit bekomme ich noch nicht hin. Und zwar wird das UI Dokument geschlossen, aber es erscheint noch die Postfachmeldung ob "Gespeichert" "verworfen" oder "gesendet" werden soll.
Diese Meldung versuchte ich zu unterdrücken.
Bisher erfolglos.

Wenn ich bei der Meldung "nicht speichern" anklicke wird das UI Dokument geschlossen und es öffnet sich das Dokument mit dem gefüllten Body Feld.

Hat jemand eine Ahnung wie man diese eine Meldung noch unterdrückt?


Sub Click(Source As Button)
   Dim ws As New NotesUIWorkspace
   Dim uidoc As NotesUIDocument
   Dim session As New NotesSession
   Dim doc As NotesDocument
   Dim Temp As String
   Dim DB As NotesDatabase
   Dim subj As String
   Dim richStyle As NotesRichTextStyle   
   Dim ergebnis As Notesrichtextitem
   Set richStyle = session.CreateRichTextStyle   
   Set uidoc = ws.CurrentDocument
   Set doc = uidoc.Document
   'Call uidoc. save( )
   doc.SaveOptions = "0"
   Call uidoc.Close(True )
   'Call doc.Save(True,True)   
   Set db = session.CurrentDatabase
   Set session = New NotesSession
   Dim richText As New NotesRichTextItem(doc, "Body")   
   subj = doc.subject (0)
   
   Dim LSDbLookup As NotesRichTextItem
   Dim lupDb As NotesDatabase            ' lookup database
   Dim lupV As NotesView               ' lookup view
   Dim lupDoc As NotesDocument         ' doc retrieved from lupV
   Dim lupItem As NotesItem            ' the field to retrieve
   Dim tmpArray As Variant               ' values of lupItem
   Dim tmprich As NotesRichTextItem
   Dim lupRich As NotesRichTextItem
   
   
   Set lupDb=session.CurrentDatabase
   If (lupDb Is Nothing) Then
      
   Else
   End If
   Set lupV=lupDb.GetView("Themen")
   If (lupV Is Nothing) Then
      
   Else
   End If
   Set lupDoc = lupV.GetDocumentByKey(subj, True)
   If (lupDoc Is Nothing) Then
      
   Else
   End If
   
   Set lupRich = lupDoc.GetFirstItem("Vorlage")
   
   
   If (lupRich Is Nothing) Then   
      
   Else
   End If
   
   Set LSDbLookup=lupRich
   
   Set ergebnis = LSDbLookup
   Call richtext.APPENDRTITEM(ergebnis)   
   Call doc.Save( True, True )
   'Dim strUnid As String
   'strUnid = doc.Universalid   
   'Delete doc
   'Call uidoc.Close( True)
   Call ws.Editdocument( True, doc )
   Call doc.RemoveItem( "SaveOptions" )
End Sub

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln