email - Lotus Notes CRLF problem

  • Thread starter Thread starter cmw
  • Start date Start date
C

cmw

I'm attempting to interface to Lotus Notes email from
Access 2000 and am having a problem with carriage returns.
I can successfully address and send outgoing mail, and
read and manipulate incoming mail.

My db contains customer information including email
addresses. I generate automated emails and incorporate ad
hoc text which the user enters in a text box. When it is
sent, the carriage returns appear as two thick black
vertical lines in the Lotus Notes body. I've tried
intercepting the CRLF and replacing with chr(13) but it
comes out the same. I've tried replacing it with the Notes
new line symbol @newline, but the "@newline" appears in
part of the body of the email.

Without the ability to format the Notes body correctly,
the application is useless...Can anyone help?
 
Access needs a carriage return (Chr$(13)) and a line feed (Chr$(10)), in
that order. When you say you've "tried intercepting the CRLF", exactly how
were you doing this (and exactly what were you checking for for CRLF)?
 
I created a form with several text
boxes, "To", "cc", "NoteText", etc. When the user clicks
the "Send" command button, I read the text boxes, into a
string variable (I tried just dimming the variable without
declaring it as a string, but the results are the same).

1. create a Notes document:
set doc = ndb.CreateDocument()

2. Fill the fields with the variables:
Call doc.AppendItemValue("Body", strNoteText)
--> where strNoteText = variable containing the entry in
the NoteText field of the form. Repeat for each field, to,
cc, etc.

3. Send the email
Call doc.Send(False,SendTo)

Everything works fine if there are no carriage returns in
the body of the text. If there are carriage returns, each
one appears as 2 black bars (I'm assuming one for Chr(13)
& Chr(10)).

I've tried using instr to find the location of the Chr(13)
and replacing strNoteText with:
A. strXXX & chr(13) & chr(10) in step 2. But the resulting
note is the same.
B. strXXX & "@NewLine" & xtrYYY (@NewLine is the
LotusNotes new line command) but the resulting note
contains the word @NewLine

I've also tried passing the text box itself in step 2, but
the Notes call does not recognize the control. (I don't
recall the exact message).

Appreciate any help you can give me.
 
See whether the text has Chr$(10) rather than Chr$(13). If that doesn't
work, check if it perhaps has Chr$(10) & Chr$(13).
 
Back
Top