views:

90

answers:

1

I am outputting RTF from a word processor component. This is working well, but there is a specific situation that is failing in that it causes Word 2000 to corrupt the document. Word 2007 is fine with the RTF though, which implies they fixed something. However, I need to be able to output RTF which will work with any version of Word.

The text that is wanted is as follows:

1. Title
blah blah blah

The key here is that this is output in a table cell. The RTF being output is extracted below. A list is set up to output numbered text which is used for the title. Then there is a \pard which resets it (highlighted below with two stars) and the plain text is output. If the \pard is used in the cell, then Word 2000 crashes. If omitted, it works fine. But then Word 2007 shows the next line with a numbered sequence too.

\trowd \clvertalt\cellx4300\clvertalt\cellx8600\intbl
{\ql\fi-432\li432\sb240\sa0\tx432\plain\s71\f1\fs20 
{\listtext 1.\tab 
}\ls1\ilvl0 title
\par**\pard**\ql\sa120\plain\s24\f1\fs20 blah blah blah
\par\cell\ql\fi0\li0\ri0\sb0\sa0\plain\s23\f12\fs20 \cell 
}\intbl
{\row 
}\trowd \clvertalt\cellx4300\clvertalt\cellx8600\intbl
{\ql\fi0\li0\ri0\sb0\sa0\plain\s23\f12\fs20\cell\ql\fi0\li0\ri0\sb0\sa0\plain\s23\f12\fs20 
\par\cell 
}\intbl
{\row 
}\pard 
{\ql\fi0\li0\ri0\sb0\sa0\plain\s23\f12\fs20 
\par
}

If anyone can suggest how to clear the list level \ls1 from the blah blah blah line, or what the problem with \pard might be, then I'd much appreciate it. Thanks!

A: 

Okay, after lots more investigation, a colleague found the answer was to add a '\intbl' after the \pard that caused the problem. Presumably this is needed to re-set a flag in Word while it is building the data.

mj2008