Without Microsoft Office

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Without Microsoft Office

Post by Silvio.Falconi »

I have an RTF document to which I have to change variables online. I can't use the Word object because the user probably doesn't have Microsoft Office. so I can't use the wordreplace function that made EMG.
How could I solve it?
in the rtf document I have strings like #variablename#
I not remember there is a function on Rtf class to change variables on a document Rtf
Have you a sample test ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Without Microsoft Office

Post by driessen »

Silvio,

Since a RTF-file is a ASCII-file, why don't you open it by using FOPEN, fiind you variable by using FSEEK, write it by using FWRITE and close your file by using FCLOSE?
So you don't need Word to replace your variables.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Without Microsoft Office

Post by Silvio.Falconi »

no found METHOD Merge( cFileNew, aFields, aVars, cAlias ) CLASS TRichEdit5
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Without Microsoft Office

Post by cnavarro »

This method exist
Image
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Without Microsoft Office

Post by Silvio.Falconi »

Cris,
I mean answered I found merge method
Correct
No, i found....
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply