> > I use the Word Selection object to "walk" every character of a text.
> > This works well until there is a soft hyphen inserted by Word for
[quoted text clipped - 13 lines]
>
> Marco P
You can infer the presence of soft hyphens by walking the displayed lines of
the document --
ActiveDocument.ActivePanes.Pages(1).Rectangles(1).Lines(1).Range
Compare each line range with the corresponding sub-range of the original in
the document body: if the last 'word' in the line is only part of a word in
the original, then a hyphen has been inserted. Conversely, if it IS a full
word, and it's not the final word of the paragraph, then the following
space(s) will have been omitted.
It sure ain't elegant, but faute de mieux.
> I'm writing a simple device-independent text-only EPS driver in word
> VBA. So far I've got everything I need except the soft hyphenation. I
[quoted text clipped - 20 lines]
>>
>> Marco P
LC - 25 Oct 2006 16:48 GMT
Thank you for responding. That gave me an idea. I walk a line of text,
character by character. When I see the last character is a letter, I do
a MoveRight wdWord, wdExtend and then count the number of characters
selected. If more than one, I assume there is a soft hyphen. It is
still not the "elegant" solution I was hoping for for it might fail in
some strange cases but it works reasonably well enough for me, for now
until I'll find a better solution.
Thanks
LC
> You can infer the presence of soft hyphens by walking the displayed lines of
> the document --
[quoted text clipped - 33 lines]
> >>
> >> Marco P