Passing the contents of the Notes field "BODY" in the NotesToPaper variable "RTF" and use in a report.
Script
...
docID$ = doc.UniversalID
ServerName$ = "MyServer/AtHome"
DBName$ = "TEST.NSF"
FieldName$ = "BODY"
ErrCode = NTPSendRTVariable ( ReportID, "RTF", ServerName$, DBName$, id$, FieldName$ )
...
Explanations:
doc = NotesDocument (contains the document from which a field is to be transferred)
ErrCode = Error code of the function
ReportID = Report handle of NotesToPaper
Report-settings
The variable is created in the report settings and must be of a type "RTF".
Report-layout
In the report layout create an object of the type "formatted text".
You can choose to either enter a "freely" defined formatted text in the object
or you select a RTF variable as "source".