Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FILETOSTR()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00431878
Message ID:
00431889
Vues:
12
>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"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform