TRVOffice Converter Problem

General TRichView support forum. Please post your questions here
Post Reply
cychia
Posts: 104
Joined: Mon Jan 16, 2006 1:52 am

TRVOffice Converter Problem

Post by cychia »

From the demo given, I have seen the Filter for OpenDialog is get from the RVOfficeConverter.GetExportFilter.

then after executed the OpenDialog, this is called:
rvc.ExportRV(sd.FileName, rve, sd.FilterIndex-2);


1. From the list of filter, I found out that there is a filter named "word 97-2000 & 6.0/95 RTF". What is this actually? if a rtf file, or doc?

2. RVOfficeConverter not supported MS WORD XP and above?

3. If I specify the filter myself without calling RVOfficeConverter.GetExportFilter. Where I can get the documentation about the index number to be passed for rvc.ExportRV(sd.FileName, rve, sd.FilterIndex-2);
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

A list of available converters is read from the Registry.
There are two lists - list of import and export converters.
They are available as ImportConverters and ExportConverters collection-propertiesof TRVOfficeConverter. Collection items have properties:

Name (name of format - can be localized!)
Path (path to the converter dll - not unique! dll can provide several converters, as far as I remember)
Filter (file mask, such as '*.doc')

You should not rely on the specific index. Another computer may have another set of installed converters, so the specific converter may have another index.

(FilterIndex-2 in this demo is because FilterIndex is counted from 1, and because native TRichView RTF export/import (without converters) is added as the first file filter item)

-----------

There are two incompatible formats of DOC files. One format was used in MS Word 6.0/95, and another format is used in newer versions of MS Word (97 and so on, including XP and above).
So, different converters may be needed to read old and new DOC files.

As for "word 97-2000 & 6.0/95 RTF" export converter, as far as I remember, it saves RTF in files with *.doc extension, so it is absolutely useless in TRichView.
This converter is included in newer versions of MS Word to make introduction of new incompatible DOC format more painless for users. Actually, users can simply save RTF file, but many MS Word users do not know what RTF is, so "word 97-2000 & 6.0/95" in the filter index could help them (at list MS thinks so)
Post Reply