Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Wrap a Memo Field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00698752
Message ID:
00698765
Vues:
30
This message has been marked as the solution to the initial question of the thread.
VFP can parse it for you.
SET MEMOWIDTH TO 75
lcMemo = < text to format >
lcNewMemo = ""
_MLINE  = 0
FOR i= 1 TO memlines(lcMemo)
	lcNewMemo = lcNewMemo + MLINE(lcMemo,1,_MLINE) + CHR(13) + CHR(10)
ENDFOR

REPLACE mymemo WITH lcNewMemo 
* or if you don't want CRLF after the last line
REPLACE mymemo WITH LEFT(lcNewMemo, LEN(lcNewMemo)-2)
>I need some help on a best (quickest) way to break a memo field down. Here is the scenario:
>
>I have to read in a set of characters into a memo field.
>Once they are in the memo field I need to break them every 75 characters with a Carriage Return Line Feed, but I don't want to break them on a word.
>I want to back down until I get to a space and then put in the carriage return line feed.
>
>So does anyone have a code solution that would quickly do this as I am dealing with a large amount of data.
>
>TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform