I have a form with a few fields (including a richtext field called ‘Body’ and other text fields). when the submit button is pressed by the user the information is picked up at the backend by an agent using DocumentContext. I want to be able to concatanate all the fields and email them to an email address. However I am struggling with the richtext handling. Please help!
Sub Initialize
Dim Session As New NotesSession
Dim webPage As NotesDocument
Set webPage = Session.DocumentContext
Dim rtitem As New NotesRichTextItem( webPage, "Body" )
Set ritem = webPage.GetFirstItem("Body")
webPage.Principal = "Fred Bloggs Feedback"
webPage.Form = "Memo"
Call rtitem.AppendText("Name: "+webPage.names(0))
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText("Dept: "+webPage.depts(0))
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText("Tel: "+webPage.telephone(0))
Call rtitem.AddNewLine( 1 )
Set webPage.Body = rtitem ****** line causing problem
Call webPage.Send(False)
webPage.remove(True)
End Sub