Is there any method of adding images or unicode characters from (say) Wingdings by in a table generated by lotusscript.
As the options for formatting of tables in lotusscript are limited I store a formatted table in a profile document and append it to the rich text field.
In the Queryopen event of the document I add the rtf table and add rows and populate. The one below is finding emails sent from a document and displaying them in that document in an RTF Any help is greatly appreciated.
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim rtItem As NotesRichTextItem
Dim rtnavBody As NotesRichTextNavigator
Dim rtt As NotesRichTextTable
Dim rc As Integer
Dim cc As Integer
Dim rcc As Integer
Dim cl As Integer
Dim richStyle As NotesRichTextStyle
Dim tablelayout As NotesRichTextItem
Dim db As NotesDatabase
Dim pdoc As NotesDocument
On Error Goto errorsub
Set uidoc = source
Set db =session.CurrentDatabase
Set doc = uidoc.Document
Set view = db.Getview("MailByParentID")
Set col = view.Getalldocumentsbykey(doc.DocID,True)
If col.count=0 Then Exit Sub 'No items exist so no point in carrying on.
End If
Set rtItem = New NotesRichTextItem(doc,"rtfCustMail") 'field in the current document
Set pdoc=db.Getprofiledocument("Profile Doc")
Set tablelayout = pdoc.GetFirstItem("rtfMailLog") 'Get a ready made table from the Profile Doc.
Call rtitem.AppendRTItem(tablelayout)
Set rtnavBody = rtItem.CreateNavigator
Set richStyle = session.CreateRichTextStyle
Set idoc = col.Getfirstdocument()
'Add a row to the table to hold the data for the first item in the order
Call rtnavBody.FindFirstElement(RTELEM_TYPE_TABLE)
Set rtt = rtnavBody.GetElement
Do Until idoc Is Nothing
Call rtt.AddRow()
'Write the item data into the tablecells --
rc%= rtt.RowCount 'Find the number of rows in the table
cc% =rtt.ColumnCount
rcc% =rc%*cc% 'Calculate total number of table cells
cl% =rcc%-5 'Calculate cell number of the first cell in the new (last) row
Call rtnavBody.FindNthElement(RTELEM_TYPE_TABLECELL,cl%) 'Move to the first cell in the last row
Call rtitem.BeginInsert(rtnavBody)
Call rtitem.Appenddoclink(idoc,"")
Call rtitem.EndInsert
Call rtnavBody.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtitem.BeginInsert(rtnavBody)
Call rtitem.AppendText(******need to add characters in here or better still images.)
Call rtitem.EndInsert
'To
Call rtnavBody.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtitem.BeginInsert(rtnavBody)
Call rtitem.AppendText(idoc.SendTo(0))
Call rtitem.EndInsert
etc etc.
Set idoc = col.Getnextdocument(idoc)
Loop
errorsub: Print " Line " Erl & " Reason - "& Error$
End Sub