Domino Code Fragment

Code Name*
How to Add Carriage Returns to a Text Field via LotusScript in Notes R4.5x
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.119.136.235
Description*
How to Add Carriage Returns to a Text Field via LotusScript in Notes R4.5x
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Using LotusScript, how can you add carriage returns to a text field in Notes 4.5x?


           To write carriage returns to a text field programmatically using LotusScript, use the ASCII character 10.
    For example, when the sample code:


     Sub Click(Source As Button)
         
         Dim w As New NotesUIWorkSpace
         Dim uidoc As NotesUIDocument
         Dim value As String
         Set uidoc = w.CurrentDocument
         value = "Line One" & Chr(10) & "Line Two" & Chr(10) & "Line Three"
         Call uidoc.FieldSetText("TestField",Value)
         
    End Sub


     is placed in a button, it will add the following lines to a field named "TestField":

     Line One
    Line Two
    Line Three