0
votes

I have a rich text field on a form with a table in and would like to have a button on the form to send an email with the table copied into the body of the email. I have tried using agents within IBM Domino Designer, but it just seems to copy the text across and not the actual format of the table? Any Help would be appreciated.

1
Try NotesDocument.RenderToRTItem...Torsten Link
Show us the code that you tried. Also please explain what you mean by "a rich text field on a form with a table in". Is the rich text field inside the table? Or is the table inside the rich text field? If it is the second case, please explain how the table gets to be inside the rich text field, because you can't simply do that with Domino Designer. It would require either the user or some sort of code putting the table into the rich text field.Richard Schwartz

1 Answers

1
votes

This is well possible via LotusScript, just make use of the NotesRichTextItem class:

Dim YourRTItemIncludingTheTable As NotesRichTextItem
Set YourRTItemIncludingTheTable = doc.GetFirstItem("YourRTItemIncludingTheTableName")

Set memo = db.CreateDocument
memo.Form = "Memo"
...
Set rtitem = New NotesRichTextItem(memo, "Body") 
Call rtitem.AppendRTItem(YourRTItemIncludingTheTable)

This will append the content of the RichText item your table is stored in to the end of the memo's body field.