Copying RichText to Text field

Hello,

I am having some difficulty figuring this out. I have a ‘Comments’ field that’s text and a ‘CurrComments’ field that is RichText. When a user puts in a comment I capture their name, the date and time and their comment, format it and append it to the ‘Comments’ field. I’m having a problem with the appending. Here’s my code:

Dim S as New NotesSession

Dim field1 As NotesRichTextItem

User = “(” & S.CommonUserName & “)” ’ Get User name

TTime = dt.DateOnly & " " & dt.TimeOnly & " " ’ Get Date & Time

’ Set text…

BeginningText = TTime & User & Chr(10)

MemberText = "Attendees: " & memberlist & Chr(10)

’ Get current comments…

Call uidoc.Refresh

Set field1 = doc.GetFirstItem( “CurrComments” )

Select Case field1.Type

Case RICHTEXT

TempString = field1.text

Case Else

‘ Do Nothing

End Select

’ Add to existing comments…

doc.Comments = BeginningText & MemberText & TempString & Chr(10) & Chr(10) & doc.Comments(0)

<<THIS WORKS FOR THE FIRST COMMENT ONLY!>>

’ Empty out fields for next time correspondence is added…

doc.CorrType = “”

doc.Members = “”

Call doc.ReplaceItemValue (“field1”, “”) <<THIS IS NOT WORKING AT ALL!>>

After typing in 3 separate comments—saving and closing each time—the ‘Comments’ field shows the UserName, Time/Date and MemberText from the 1st comment and the actual comment text from the 3rd comment. I’ve read the forum and see bits and pieces that have helped me but I’m stuck on this. The users want to be able to paste screen shots of emails in the ‘CurrComments’ field.

Thanks for the help.

Subject: Copying RichText to Text field

I have done it this way.

set tempnotesitem = doc.comments

doc.comments delete

doc.comments = New string

doc.comments append tempnotesitem.text