Rich Text Computation & Formating

Author: Tripp W Black

Created: 08/26/1999 at 07:51 PM

 

Category:
Notes Developer Tips
Forms/Subforms, LotusScript

Author:
Matt Davis
Date:
Wednesday, 4/21/99 8:15 PM EDT
Subject:
RTIs can be computed




Yes, Rich Text Items can be computed. In order to control the formatting, I have used script, an example
that create an e-mail. Look at other methods of RTI class to adjust font, centering etc.
(There is more script before)
Dim nses_Current As New NotesSession
Dim ndoc_Email As NotesDocument
Dim nritm_Body As NotesRichTextItem
Dim SendTo As Variant

Set ndoc_Email = nses_Current.CurrentDatabase.CreateDocument
Set nritm_Body = New NotesRichTextItem (ndoc_Email, "Body")

'Set the Send To
ndoc_Email.SendTo = IOTGetConfigValue("Database" , "txt_NewPartAddress")

'Set the other fields
ndoc_Email.Form = "Memo"
ndoc_Email.From = nses_Current.username
ndoc_Email.Subject = "Line Item(s) needs part number for sales order processing. Proposal: " &
ndocHeader.txt_ProposalTitle(0)

'Set the body
nritm_Body.AppendText "The following line item(s) need part numbers added to WDS2 in order to process " &
_
"a sales order associated with the proposal titled: " & ndocHeader.txt_ProposalTitle(0) & " -> "
nritm_Body.AppendDocLink ndocHeader, "SO Header"
nritm_Body.AddNewLine 2

Forall ndoc In lDocProblemLines
nritm_Body.AppendText "Part: " & ndoc.txt_PartNumber(0) & " -- " & ndoc.txt_PartDescription(0)
nritm_Body.AddTab 1
nritm_Body.AppendDocLink ndoc, "Line Item"
nritm_Body.AddNewLine 1
End Forall
nritm_Body.AddNewLine 2
nritm_Body.AppendText "Please notifiy me when this is completed so that I may process the sales order.
Thank you!"
ndoc_Email.SaveMessageOnSend = False
ndoc_Email.Send False


previous page