[thelist] Textarea, hard returns, ASP, and CDOSYS

Ken Schaefer ken at adOpenStatic.com
Fri Oct 24 00:26:01 CDT 2003


Tab,

I would do some further testing on this...

vbCrLf is actually just a VBScript constant for Chr(13) & Chr(10). With your
replace, all you're doing is removing the Chr(13), leaving the Chr(10)
there.

So, if that suddenly starts resulting the carriage return/line feed being
rended by the email client, then I suspect that it's something to do with
the particular email client you are using, not anything to do with CDOSYS
(but I could be wrong about that - see vbNewLine character: maybe you should
use that?)

Other constants:

      vbCr Chr(13) Carriage return.
      VbCrLf Chr(13) & Chr(10) Carriage return-linefeed combination.
      vbFormFeed Chr(12) Form feed; not useful in Microsoft Windows.
      vbLf Chr(10) Line feed.
      vbNewLine Chr(13) & Chr(10) or Chr(10) Platform-specific newline
character; whatever is appropriate for the platform.
      vbNullChar Chr(0) Character having the value 0.
      vbNullString String having value 0 Not the same as a zero-length
string (""); used for calling external procedures.
      vbTab Chr(9) Horizontal tab.
      vbVerticalTab Chr(11)




Cheers
Ken

----- Original Message ----- 
From: "Tab Alleman" <Tab.Alleman at MetroGuide.com>
To: <thelist at lists.evolt.org>
Sent: Friday, October 24, 2003 4:03 AM
Subject: RE: [thelist] Textarea, hard returns, ASP, and CDOSYS


Joel D Canfield wrote:
>> Does anybody here know the best way to get hard returns
>> entered into a text field to translate into vbCrLf's in an ASP
>> script?
>
> Do you mean a textarea? In my experience, the come *out* as VbCrLf - I
> normally do a VbCrLf -> <br /> replace when dumping to a db or
> something. Odd that it shouldn't be carrying across to the e-mail. I
> use VbCrLf to create line breaks in automated e-mails, so again, it
> oughta be working.

Thanks to all who helped (or at least tried to)..

The hard returns were, in fact, translating to vbCrLf in the ASP script
that received them.  But for some reason, those weren't being translated
into New Line/Carriage Returns, whatever you'd like to call 'em by
CDOSYS (sending plain text mail, not HTML).

I eventually got the results I wanted with:

strText = Replace(strText, vbCrLf, Chr(10))

...no kidding.  That did the trick.  Go figure.

-Tab
-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list