Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting carriage returns in a memo field
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01546530
Message ID:
01546551
Views:
45
>>>Hi all,
>>>
>>>I have an edit box on a form where the user can type what they want. a button at the bottom send this via email but the email is set to text/html and I have to leave it this way as other emails get sent automatically that are formatted html. I've been trying but with no success to identify carriage returns in the field and replacing them with a
to try to add some formatting to the email.
>>>Any ideas?
>>>
>>>~M
>>
>>Try
>>
>>chrtran(myMemo, chr(13) +chr(10), '<br/>')
>
>thanks for coming back, I've tried variats of this code below but the result that I put back onto the screen never shows the br code as being added to the text
>~M

Found it!
mbody2 = strtran(mbody, chr(13), 'zzz')
thanks
~M

>
>
>mbody = thisform.edtbody.Value
>
>* this always returns a yes, have to to make sure it can see the chr(13)
>IF CHR(13) $ UPPER(mbody)
>	WAIT WINDOW "yes" TIMEOUT 1
>ELSE
>	WAIT WINDOW "no" TIMEOUT 1
>ENDIF
>
>chrtran(mbody, chr(10), '<br/>')
>*chrtran(mbody, chr(13), '<br/>')
>*chrtran(mbody, chr(13) + chr(10), '<br/>')
>*chrtran(mbody, chr(10) + chr(13), '<br/>')
>
>
>* so I can see the result
>thisform.edtbody2.Value = mbody
>
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform