RTF documents as templates
JosepM
jmyepes at mac.com
Wed Jun 9 13:20:36 EDT 2010
Update code using theRTFText of field XXXX
The revCopyFile don't copy the bundle, only create the file so searching for
the list I found a piece of code to copy using the shell.
If someone want the stack and the RTF file to test email me and I send you.
Salut,
Josep
on mouseUp
put mactoiso(the RTFText of fld f_texto1) into texto1
put mactoiso(the RTFText of fld f_texto2) into texto2
put mactoiso(the RTFText of fld f_texto_f1c1) into texto_f1c1
put mactoiso(the RTFText of fld f_texto_f1c2) into texto_f1c2
put mactoiso(the RTFText of fld f_texto_f1c3) into texto_f1c3
put mactoiso(the RTFText of fld f_texto_f2c1) into texto_f2c1
put mactoiso(the RTFText of fld f_texto_f2c2) into texto_f2c2
put mactoiso(the RTFText of fld f_texto_f2c3) into texto_f2c3
answer file "Where is the template file?"
if it is empty then exit mouseUp
put it into theTemplateFile
ask file "Save your message as:" with "TheResultingRTF.rtfd"
if it is empty then exit mouseUp
put it into theMergedFile
set the fileType to "MSWDRTF "
--
put ("cp -R -p ""e&theTemplateFile"e&"e&theMergedFile"e)
into tCommand
get shell(tCommand)
--
put TXT & ".rtf" into tFichero
put theTemplateFile & "/" & tFichero into tTheFile
put URL("binfile:" & tTheFile) into theRTFtext
set the fileType to "MSWDRTF "
put merge(theRTFtext) into URL ("binfile:" & theMergedFile & "/" &
tFichero)
end mouseUp
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/RTF-documents-as-templates-tp322967p2249205.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list