How to find an Automatic Hyphen in text
Dear friends and experts,
I want to find automatic hyphens in a selected text.
It turns out that both oDoc.GetTextForRange and object.GetText eliminate these characters which are in the text (e.g. they are are present in MIF) - char code \x06.
In the example output from GetText such characters are expected at the end of lines 1 and 2:
Far far away, behind the word mountains, far from the coun
tries Vokalia and Consonantia, there live the blind texts. Sepa
rated they live in Bookmarksgrove right at the coast of the
Semantics, a large language ocean
Of course they can be found with the Find method and the following Find parameters:
oPropVal2.propIdent.num = Constants.FS_FindObject;
oPropVal2.propVal.valType = Constants.FT_Integer;
oPropVal2.propVal.ival = Constants.FV_FindAutomaticHyphen ;
Any ideas?
I imagine a brute force method:
- Save the document prophylactically (mhm, the user might not like this).
- Get the start location of the text range.
- Insert an End-of-flow character after the text location.
- Issue an ordinary Search at the start location.
- Memorise the found text range (if found).
- Remove the end-of-flow charcter.
- Select the memorised text range to indicate the find.

