I am creating a table in a rich text field using the Notes Rich Text classes.
In the last cell of the table – the lower right cell of the table – I am adding text using the AppendText method. The text is a number that I convert to a string before I insert.
Here is the issue: It is adding a trailing zero to the text. For example if it is 54, it puts in 540.
I put this through the debugger and the value of the field on the actual document is set to 54 right before I call the AppendText method.
There are other values like this that I add to the table that do not add the trailing zero.
Here is the code snippet:
Call rtNavBody.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtBody.BeginInsert(rtNavBody)
totalHours = Cstr(doc.TOT_T(0))
'totalHours = Format$(Cstr(doc.TOT_T(0)), "00")
'Call rtBody.AppendText(Cstr(Cint(totalHours) / 10))
Call rtBody.AppendText(totalHours)
Call rtBody.EndInsert
As you can see I even tried formatting the text to two characters as well as dividing by 10.
No luck on either – it is adding the zero somewhere in the AppendText method.
Any ideas?
Thanks!
Dan