Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting carriage returns in a memo field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01546530
Message ID:
01546549
Vues:
51
>>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
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform