Bharat_Naik wrote on Mar 21
st, 2008 at 10:04pm:
1. I could not get .rtf file to work when I save the file in MS Word as .rtf file. If I open the .rtf file in WordPad and then save it in WordPad, the file works fine.
Word does save the RTF file in a slightly different pattern than WordPad does. Naturally, this can have an effect on how you deal with an RTF file when manipulating it in SBasic.
For instance, WordPad places the "\par" paragraph tag at the end of a line followed by CRLF (Carraige Return w/Line Feed) like this:
[[Name]]\par
[[Address1]]\par
[[Address2]]\par
[[City]], [[State]] [[Zip Code]]\par
Whereas Word places the CRLF
before the paragraph tag, then followed by a space like this:
[[Name]]
\par [[Address1]]
\par [[Address2]]
\par [[City]], [[State]] [[Zip Code]]
\par
(Note that you MUST maintain the space between the "\par" tag and the text that appears after it. Otherwise, the entire line will be ignored in the final output.)
So yes, there's a logical reason why saving it with WordPad may have "fixed" it, because it would have reversed the order of the CRLFs and the "\par" tags.