My program written in Delphi 7 opens a Word document and then sorts the paragraphs according to a binary table. The binary table is based on a tailored version 3.1.1 of Allkeys Table (http://www.unicode.org/reports/tr10/#AllKeys). The tailoring was done (according to the suggestion of Mark Davis) to interchange all the instances of Arabic letter Waw with He. Such a sorting, where Waw is preceding He, is useful for languages like Kurdish, Persian, Dari, Tajik, Pashto, Urdu etc. The program does right sorting of alpha-numeric and Arabic wide (Unicode) strings, but there are some inconveniences in usage:

1. I could not find in Delphi documentation any function that allows reading from the Word Application the position of the Selection (beginning and end) to set the range of sorting. Now I have to sort all the paragraphs in the document.

2. I could not find the way to preserve formatting of the sorted strings. They are coming out in default (Normal) style losing other applied fonts and styles.

May be somebody can give me a hint or refer to a source where such questions are discussed.

 

Thank you,

Vladimir Ivanov

Reply via email to