Got it! Field from form = Body - how?

I figured this out - thank you.

With this script, how can I get my History field to be the body of my e-mail message? I am getting the message to send to the Reviewers_1 field, but with no text in the e-mail message. Any help would be greatly appreciated.

Sub Postsave(Source As Notesuidocument)

Dim session As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim doc2 As NotesDocument

Dim item As NotesItem

Set uidoc = workspace.CurrentDocument

Set doc = uidoc.Document

Set db = session.CurrentDatabase



If uidoc.FieldGetText("History") > "" Then

	Set doc2 = New NotesDocument(db)

	Set item = doc.GetFirstItem("Subject")

	Call item.CopyItemToDocument(doc2, "Subject")

	Set item = doc.GetFirstItem("Reviewers_1")  ' for testing using this field

	Call item.CopyItemToDocument(doc2, "SendTo")

	Set item = doc.GetFirstItem("History")

	Call item.CopyItemToDocument(doc2, "History")

	Call doc2.Send(False, doc.Reviewers_1) ' for testing using this field

Else 

End If

End Sub

Subject: Got it! Field from form = Body - how??

Maybe like this:

call doc2.ReplaceItemValue(“Body”, uiDoc.Document.GetItemValue(“History”)(0))

Is “History” a Textbox or a RichTextField? As a textbox it should work.

For A RichtTextField you can create a new computed field “Abstracted” with this Formula :

@Right(@Text(Body); @Length(@Text(Body)) - 1)

And use “Abstracted” as your “History” (source) field.