Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: DAU-in am 07.10.06 - 08:54:31

Titel: per Script erzeugtes Bodyfeld wird nicht angezeigt
Beitrag von: DAU-in am 07.10.06 - 08:54:31
Hallo!

Ich erzeuge eine neue Mail in der Maildatenbank, schreibe per Script Daten aus dem aktuellen Dokument in das Bodyfeld und öffne dann die Mail.

Das Bodyfeld erscheint immer leer.
Im Debugger sehe ich , daß das Bodyfeld belegt wird.

Woran liegt das?


hier mein Script:

Dim session          As New NotesSession
   Dim ws                As New NotesUIWorkspace
   Dim uidoc_current   As NotesUIdocument
   Dim doc_Current    As NotesDocument
   Dim var_books       As Variant
   Dim va_Users       As notesView
   Dim doc_User       As NotesDocument
   Dim i_Flag          As Boolean
   Dim str_User         As String
   Dim str_Mailserver As String
   Dim str_MailPath    As String
   Dim db_Mail         As NotesDatabase
   Dim doc_mail      As NotesDocument
   Dim str_Mail         As String
   Dim item_body      As NotesRichtextItem
   Dim str_Abwesgrund As String
   Dim str_Type          As String


'
---
'

   
   Set item_Body = doc_Mail.createRichTextItem("Body")
   'Set item_Body =  New NotesRichTextItem(doc_Mail, "Body")
   Call item_Body.AddNewLine( 5 )
   
   Call item_body.AppendText( "_________________________________________________" )
   Call item_Body.AddNewLine( 1 )
   Call item_body.AppendText("Antragsteller : " & doc_current.Subject_(0) )
   Call item_Body.AddNewLine( 1 )
   Call item_body.AppendText("Grund: " & str_AbwesGrund )
   Call item_Body.AddNewLine( 1 )
   
   
   If doc_Current.DateOrTimeRange(0) = "1" Then
      Call item_body.AppendText(Cstr(doc_current.Workdate(0)))
      Call item_Body.AddNewLine( 1 )
   End If
   
   If doc_Current.DateOrTimeRange(0) ="2" Then
      Call item_body.AppendText(Cstr(doc_Current.DateStart(0)) & " bis " & doc_Current.DateEnd(0))
      Call item_Body.AddNewLine( 1 )
   End If
   
   Call Item_Body.AppendDocLink(doc_current, "zum Antrag")
   
   Set uidoc_current = ws.EditDocument(True , doc_Mail , False , ,  ,  )
Titel: Re: per Script erzeugtes Bodyfeld wird nicht angezeigt
Beitrag von: m3 am 07.10.06 - 10:57:03
Bitte lies die Designer-Hilfe. Wenn Du im Backend (NotesDocument) ein RTF befüllst, musst Du das doc erst speichern, bevor Du es im UI aufmachst.

Ich seh in Deinem Code kein doc_mail.Save....

Und wo erstellst Du das doc_mail?
Titel: Re: per Script erzeugtes Bodyfeld wird nicht angezeigt
Beitrag von: DAU-in am 07.10.06 - 12:41:40
DAnke, Problem gelöst!