Results 1 to 3 of 3

Thread: CRLF not working in body of notes msg

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Chicago
    Posts
    40

    Question CRLF not working in body of notes msg

    For some reason, when using early binding with the the following code:

    Dim Msg as String

    Call DomDocument.ReplaceItemValue("Body", Msg)

    My body of my Lotus Notes email shows up as:

    Robot was started on 12/14/2001 at 10:23:12 AM|| Successful scenarios = 2 |Abort Message = None|

    The crlf are not working and showing up as text in the form of a pipe symbol or something of that sort.

    I tried just using Chr(10) ,Chr(13) , vbNewLine, and VBCrlf and nothing works. Does anyone know how to get this to work?
    Last edited by OhYeahLach; May 1st, 2002 at 12:37 PM.

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Are you trying to get a new line in the body of an e-mail from the command line? If so I think you need to use %0D%0A instead of actual new lines. The e-mail client should change these into new lines. Sorry if that's not what you want.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Chicago
    Posts
    40

    Cool Found the answer

    I ended up replacing my crlfs with "~". Then in my sub I added the following code to replace my string with a RichTextItem with crlfs:


    'Notes had a problem recognizing crlf with the body of the message by just inserting them as Chr(13) & Chr(10), so the body of the email is a richtextitem which has a method of addnewline

    Dim OriginalMsg as String
    Dim Msg as String
    Public DomDocument As NotesDocument
    DimBodyRTF As NotesRichTextItem

    Msg = OriginalMsg
    If InStr(1, Msg, "~") > 0 Then
    Set BodyRTF = DomDocument.CreateRichTextItem("Body")
    Do Until Len(Msg) = 0
    MsgLine = Left(Msg, InStr(1, Msg, "~") - 1)

    If MsgLine <> "" Then
    Call BodyRTF.AppendText(MsgLine)
    Call BodyRTF.AddNewLine
    Else
    Call BodyRTF.AddNewLine
    End If

    Msg = Right(Msg, Len(Msg) - (InStr(1, Msg, "~")))
    Loop
    Else
    'Creates a body without crlfs
    Call DomDocument.ReplaceItemValue("Body", Msg)
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width