Also ich möchte eine Fehlerprotokollierung schreiben, welche in einem NotesRichTextItem gespeichert wird.
Ich bin wie folgt vorgegangen
Dim session As New NotesSession
Dim dbThis As NotesDatabase
Dim rtFehlerprotokoll As NotesRichTextItem
Dim docFehlerprotokoll As NotesDocument
Set dbThis = session.CurrentDatabase
Set docFehlerprotokoll = New NotesDocument( dbThis )
docFehlerprotokoll.Form = "Fehlerprotokoll"
Set rtFehlerprotokoll = New NotesRichTextItem( docFehlerprotokoll, "txtFehlerprotokoll" )
'Steht in einer Schleife
rtFehlerprotokoll.AppendText( Text )
Call docFehlerprotokoll.Save( True, False )
So leider sehe ich auf meinem Fehlerprotokolldokument das RichText Feld nicht und wenn ich mir die Eigenschaften des Feldes anschaue, erstellt er mir ganz viele RichText Felder. Wo liegt das Problem (mal abgesehen davon, das es wahrscheinlich vor der Tastatur sitzt ;))
So geht's bei mir :
Dim docProtokoll As NotesDocument
Dim agent As NotesAgent
Dim dateTime As New NotesDateTime( "" )
Set docProtokoll = dbThis.createDocument
docProtokoll.form = "protokoll"
docProtokoll.name = "Importquery"
Call dateTime.SetNow
Set rtitem = New NotesRichTextItem (docProtokoll, "protokoll")
Call rtitem.AppendText( "Protokoll : Importquery")
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Anzahl Begriffe neu : " + Cstr(zaehl))
docProtokoll.anzahl_docs = Cstr(zaehl)
varDummy = docProtokoll.ComputeWithForm( False, False )
Call docProtokoll.Save( False, False )