[fpc-pascal]RTF
David Emerson
dle3ab at angelbase.com
Tue Jun 29 05:32:46 CEST 2004
>But if you just need to create a single kind of document,
>perhaps with some data changed, then you can often solve the
>problem much more simply by: (1) create an RTF document in
>your favorite software; (2) Insert tags like ##ADDRESS1## where
>you want to substitute text; (3) read in the template and
>replace the tags with the text of your choice.
I recently wrote a program that does this. My primary problem
arose from microsoft word being stupid (big surprise, huh?)
Suppose I inserted a tag such as the above example, ##ADDRESS1##
(I think I used greater-than/less-than brackets rather than
pound symbols -- but those don't email well!) MS Word would
sometimes insert rtf tags right in the middle of the word, for
no obvious reason. So I would get something like:
##ADDR{\bizarre rtf tag, sometimes
containing carriage returns in the middle} ESS1##
My solution was to save as Word version 2, close and reopen,
then save as rtf. It might not be a bad idea to go with the XML
or LaTeX. But if you'd like a copy of the program I wrote, let
me know and I'll post it or email it to you.
~David
More information about the fpc-pascal
mailing list