Save as rtf, rvrtfSaveStyleSheet, TOC

General TRichView support forum. Please post your questions here
Post Reply
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

Save as rtf, rvrtfSaveStyleSheet, TOC

Post 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
Sergey Tkachenko
Site Admin
Posts: 17499
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply