Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FILETOSTR()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00431878
Message ID:
00431889
Views:
11
>what can I use instead of FILETOSTR(). I have this HTML file I want to paste into Oulook, so in Ver6 I say:
>lcBody = FILETOSTR("Myfile.HTM")
>oitem.htmlbody=lcBody
>but in Ver 5 I can't do this. So what can I use?

Sérgio gave you FileToStr, this is StrToFile


function strtofile
lpara tcString, tcFileName

tcString = IIF(EMPTY(tcString),"",tcString)

lnHandle = FCREATE(tcFileName)

IF lnHandle = -1
RETURN .F.
ENDIF

local llSuccess
llSuccess = FWRITE(lnHandle,tcString)
=FCLOSE(lnHandle)

RETURN (llSuccess # 0)

...Y soy feliz, bien feliz, asi lo grito;
Mira, que el mundo sepa, que se sepa:
Soy feliz....                       

...And I'm happy, quite happy, so do I yell it;
Look, so the world knows it, so be known:
I'm happy...
 

Ismael Rivera "Oye cosita linda"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform