Page 1 of 1

Save as rtf, rvrtfSaveStyleSheet, TOC

Posted: Wed Apr 30, 2014 12:04 pm
by mboth
Hello Sergey,

I hope you are well.

When you export to RTF, open the file in word and create a table of contents (TOC) in word, word will include all direct and character/text styles of headings in the TOC.

However, the TOC should be formatted according to special TOC paragraph styles which are defined in the word template.

Direct formatting in the TOC will vanish if you select the TOC and hit Ctrl+Space, but it will appear again after update of the TOC field.

Adding rvrtfSaveStyleSheet to RTFOptions does not help. It will create style sheets for the paragraphs but also style sheets for the characters. Since the headings are formatted with character formats on top of the paragraph formats, the charancter formats will appear in the TOC.

So the question... is there a way to instruct TRichView to export all style sheets in paragraph style sheets? (We use distinct text format styles for each paragraph style respectively.)

Can you merge charancter style sheets info paragraph style sheets for the RTF export?

Or is there any other solution?

Thanks
Moritz

Posted: Wed Apr 30, 2014 5:09 pm
by Sergey Tkachenko
The proper solution is using StyleTemplates. They are almost identical to MS Word's styles.

rvrtfSaveStyleSheet is deprecated. But it export only text and paragraph styles having Standard property = True, so you can simply use text styles with Standard=False.