Page 1 of 1

Without Microsoft Office

Posted: Wed Jun 10, 2020 7:44 am
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 ?

Re: Without Microsoft Office

Posted: Wed Jun 10, 2020 11:08 am
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.

Re: Without Microsoft Office

Posted: Wed Jun 10, 2020 11:41 am
by Silvio.Falconi
no found METHOD Merge( cFileNew, aFields, aVars, cAlias ) CLASS TRichEdit5

Re: Without Microsoft Office

Posted: Wed Jun 10, 2020 11:49 am
by cnavarro
This method exist
Image

Re: Without Microsoft Office

Posted: Wed Jun 10, 2020 10:46 pm
by Silvio.Falconi
Cris,
I mean answered I found merge method
Correct
No, i found....