Highlight at non-insertion point

H

hs

I have bookmarks in a Word document corresponding to areas
of text I would like to highlight based upon events
external to Word.

Is there a way to highlight text within those bookmarks
without temporarily shifting the insertion point of the
document to the area that I want to highlight.

In other words, the user could be typing in some other
part of the document when these external events occur, and
I do not want either the user to be interrupted or some of
the charcters they are typing to be inserted at the wrong
spot.
 
C

Cindy M -WordMVP-

Hi Hs,
I have bookmarks in a Word document corresponding to areas
of text I would like to highlight based upon events
external to Word.

Is there a way to highlight text within those bookmarks
without temporarily shifting the insertion point of the
document to the area that I want to highlight.
Sure, you just have to work directly with the RANGE object,
instead of Selection. Roughly:


ActiveDocument.Bookmarks("Name").Range.HighlightColorIndex =
wdTurquoise

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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