Get Heading1, Heading2 , etc from docx file

General TRichView support forum. Please post your questions here
Post Reply
saeid2016
Posts: 72
Joined: Wed Mar 16, 2016 11:56 am

Get Heading1, Heading2 , etc from docx file

Post by saeid2016 »

Hello,
After convrting doc, docx files using TRVOfficeConverter is it possible to get standard styles of converted text such as Heading1, Heading2, etc without considering the style specifications such as color, font size , etc? In other words is the Heading1 style of doc, docx files recognizable by itself and only by title?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Get Heading1, Heading2 , etc from docx file

Post by Sergey Tkachenko »

These are named styles, they are loaded from DocX using TRVOfficeConverter, if Editor.UseStyleTemplates = True.
They are loaded in Editor.Style.StyleTemplates collection.
And they are recognizable by their name, Editor.Style.StyleTemplates[].Name.
For headings, they are 'heading 1', 'heading 2', etc. (case sensitive). For standard styles, like headings, MS Word and RichViewActions display their localized names. For English, 'heading 1' is displayed as 'Heading 1', and so on.
Post Reply