Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing blank lines from word .doc
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01430433
Message ID:
01430444
Views:
45
>Suppose I copy the content to "myfile.txt"
>
>Is the a simple way to remove blank links using filetostr () with some program lines ?

If the file is a REAL text file:
#define CRLF CHR(13)+CHR(10)
lcFile = FILETOSTR(....)
DO WHILE ATC(CRLF+CRLF,lcFile)
   lcFile = STRTRAN(m.lcFile, CRLF+CRLF, CRLF)
ENDDO

IF LEFT(m.lcFile,2) == CRLF && Remove first blank line
   lcFile = SUBSTR(m.lcFile,3)
ENDIF

IF RIGHT(m.lcFile,2) == CRLF && Remove last blank line
   lcFile = LEFT(m.lcFile,LEN(m.lcFile)-2)
ENDIF

STRTOFILE(lcFile,....)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform