DoctorGonzo
Programmer
Hi folks,
I have a field on my form called BODYTEXT, which is a text field.
THis field contains a formula that gets text, number, date and Rich text fields.
An agent runs to compose memo and appends this text field into the memo.body.
It works fine UNTIL I put the rich text fields in there.
This is the field contents :
"New Holiday Feedback Submitted by " + Username +
@NewLine + @NewLine +"Holiday Company Travelled with : " + FB_HolComp +
@NewLine + @NewLine +"Departure Date : " + FB_DepartDate +
@NewLine + @NewLine +"The User submitted the following comments: " +
@NewLine + @NewLine +"On the booking process: " + FB_BookProcessComments +
@NewLine + @NewLine +"On Airports/flights: " + FB_AirportsFlightsComments +
@NewLine + @NewLine +"Please do not reply to this email message. It has been automatically generated by the intranet."
The comments fields are the Rich text ones. Here is the agent :
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim doc As notesdocument, cdoc As notesdocument
Dim rt As notesrichtextitem
Dim message As String
Set db = s.currentdatabase
Set doc = New notesdocument(db)
Set cdoc = s.documentcontext
message=cdoc.message(0)
doc.SendTo = cdoc.Recipients
doc.form = "Memo"
doc.subject = "New holiday feedback from " & cdoc.Username(0)
Set rt = New notesrichtextitem(doc,"Body")
' import the contents of the message field on the Document into the BODY of the memo
Call rt.appendtext(bodytext)
Call doc.send(False)
Print "mail sent"
End Sub
Can anyone advise me? I've scoured about but not sure really what to search on... tried RICH TEXT, @TEXT etc.
Thanks,
Gonzo
I have a field on my form called BODYTEXT, which is a text field.
THis field contains a formula that gets text, number, date and Rich text fields.
An agent runs to compose memo and appends this text field into the memo.body.
It works fine UNTIL I put the rich text fields in there.
This is the field contents :
"New Holiday Feedback Submitted by " + Username +
@NewLine + @NewLine +"Holiday Company Travelled with : " + FB_HolComp +
@NewLine + @NewLine +"Departure Date : " + FB_DepartDate +
@NewLine + @NewLine +"The User submitted the following comments: " +
@NewLine + @NewLine +"On the booking process: " + FB_BookProcessComments +
@NewLine + @NewLine +"On Airports/flights: " + FB_AirportsFlightsComments +
@NewLine + @NewLine +"Please do not reply to this email message. It has been automatically generated by the intranet."
The comments fields are the Rich text ones. Here is the agent :
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim doc As notesdocument, cdoc As notesdocument
Dim rt As notesrichtextitem
Dim message As String
Set db = s.currentdatabase
Set doc = New notesdocument(db)
Set cdoc = s.documentcontext
message=cdoc.message(0)
doc.SendTo = cdoc.Recipients
doc.form = "Memo"
doc.subject = "New holiday feedback from " & cdoc.Username(0)
Set rt = New notesrichtextitem(doc,"Body")
' import the contents of the message field on the Document into the BODY of the memo
Call rt.appendtext(bodytext)
Call doc.send(False)
Print "mail sent"
End Sub
Can anyone advise me? I've scoured about but not sure really what to search on... tried RICH TEXT, @TEXT etc.
Thanks,
Gonzo