Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Highlighting as a Reading Aid in Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill151 - 21 Oct 2005 16:36 GMT
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"


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.