Without Microsoft Office

Without Microsoft Office

Postby Silvio.Falconi » Wed Jun 10, 2020 7:44 am

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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6896
Joined: Thu Oct 18, 2012 7:17 pm

Re: Without Microsoft Office

Postby driessen » Wed Jun 10, 2020 11:08 am

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1417
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Without Microsoft Office

Postby Silvio.Falconi » Wed Jun 10, 2020 11:41 am

no found METHOD Merge( cFileNew, aFields, aVars, cAlias ) CLASS TRichEdit5
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6896
Joined: Thu Oct 18, 2012 7:17 pm

Re: Without Microsoft Office

Postby cnavarro » Wed Jun 10, 2020 11:49 am

This method exist
Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Without Microsoft Office

Postby Silvio.Falconi » Wed Jun 10, 2020 10:46 pm

Cris,
I mean answered I found merge method
Correct
No, i found....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6896
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Rick Lipkin, Silvio.Falconi and 39 guests