When I need to read long word documents closely, it would be a great help if
I could automatically have the line I'm reading highlighted, with the ability
to unhighlight that line and move the highlighting down to the next line as I
read by moving my cursor with my mouse, or by using the down arrow key, etc.
Does anyone know of a way of doing this with word?

Signature
Bill
Jezebel - 23 Oct 2005 00:23 GMT
It's certainly do-able, but not trivial if you're not fairly comfortable
with VBA coding. The lines of the displayed document are available through
the Page.Rectangles collection. This is a somewhat mysterious bit of object
modelling the describes the physical rendering of the document as a
collection of rectangular areas (header, footer, columns, lines, graphics,
etc). Your challenge is to find the lines, and successively highlight
them -- eg by positioning a color rectangle under the line in question.
Don't interfere with the text itself, eg by bolding it, because that will
sometimes cause the page to reformat, since bold text is wider than normal
text.
> When I need to read long word documents closely, it would be a great help
> if
[quoted text clipped - 6 lines]
>
> Does anyone know of a way of doing this with word?
Helmut Weber - 23 Oct 2005 10:19 GMT
Hi Bill,
see: http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm
You may use a WindowSelectionChange-event
and highliht a line, like:
Selection.Bookmarks("\line").Range.HighlightColorIndex = wdYellow
The more difficult part would be, to remove the highlighting
again after the windowselectionchangeevent.
If you really want to have such a function,
show us, how far you get without detailed help.
Can all be done, more or less.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"