So etwas verspätet folgt nun auch der Code meiner Tabellenbefüllung:
Set rtiBody = MailDoc.GetFirstItem( "Body" )
rtiBody.AddNewline(1)
'First Entry ?
If ScriptError = False Then
'Erstellen der ersten zwei Tabellenzeilen und befüllen
rtiBody.AppendText( TEXTERROR )
Set styles(1) = session.CreateRichTextParagraphStyle
Set styles(2) = session.CreateRichTextParagraphStyle
Set styles(3) = session.CreateRichTextParagraphStyle
Set styles(4) = session.CreateRichTextParagraphStyle
Set styles(5) = session.CreateRichTextParagraphStyle
styles(1).LeftMargin = 0
styles(1).SpacingAbove = SPACING_ONE_POINT_25
styles(1).FirstLineLeftMargin = 0
styles(1).RightMargin = RULER_ONE_INCH*2.5
styles(1).Alignment = ALIGN_LEFT
styles(2).LeftMargin = 0
styles(2).SpacingAbove = SPACING_ONE_POINT_25
styles(2).FirstLineLeftMargin = 0
styles(2).RightMargin = RULER_ONE_INCH*2.5
styles(2).Alignment = ALIGN_LEFT
styles(3).LeftMargin = 0
styles(3).SpacingAbove = SPACING_ONE_POINT_25
styles(3).FirstLineLeftMargin = 0
styles(3).RightMargin = RULER_ONE_INCH*2.5
styles(3).Alignment = ALIGN_LEFT
styles(4).LeftMargin = 0
styles(4).SpacingAbove = SPACING_ONE_POINT_25
styles(4).FirstLineLeftMargin = 0
styles(4).RightMargin = RULER_ONE_INCH*2.5
styles(4).Alignment = ALIGN_LEFT
styles(5).LeftMargin = 0
styles(5).SpacingAbove = SPACING_ONE_POINT_25
styles(5).FirstLineLeftMargin = 0
styles(5).RightMargin = RULER_ONE_INCH*1.5
styles(5).Alignment = ALIGN_LEFT
Call rtiBody.AppendTable(2,5,,,styles)
Set rtnav = rtiBody.CreateNavigator
Call rtnav.FindLastElement( RTELEM_TYPE_TABLE)
Set rtt = rtnav.GetElement
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL, 1 )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "Name" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "DocType" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorMessage" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorLine" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "DocLink" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL, 1 )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText("Name")
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "DocType" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorMessage" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorLine" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendDocLink( targetDoc, "" )
Call rtiBody.EndInsert
Else
'hinzufüngen einer weiteren Tabellenzeile
Set rtnav = rtiBody.CreateNavigator
Call rtnav.FindLastElement( RTELEM_TYPE_TABLE )
Set rtt = rtnav.GetElement
rtt.AddRow
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "Name" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "DocType" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorMessage" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendText( "ErrorLine" )
Call rtiBody.EndInsert
Call rtnav.FindNextElement( RTELEM_TYPE_TABLECELL )
Call rtiBody.BeginInsert(rtnav)
Call rtiBody.AppendDocLink( targetDoc, "" )
Call rtiBody.EndInsert
End If
Mit diesem springe ich jedoch vor dem befüllen der neuen Werte in die erste Zeile.
Wie kann ich dies verhindern und bewerkstelligen, dass ich die letzte neu hinzugefügte Tabellenzeile befüllen kann?
Gruß Hupfi