Highlighting as a Reading Aid in Word

B

Bill151

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?
 
J

Jezebel

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.
 
H

Helmut Weber

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.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top