make Selection in visible in window

Z

zSplash

I have just selected a bookmark ("Here"). I want to see (in the window) the
selection/range. I have tried this code, unsuccessfully:
ActiveDocument.ActiveWindow.ScrollIntoView Selection.Range, True

I have also tried the following, but get an error, even though the bookmark
exists (thus, don't know if this would make the selection visible:
Application.ActiveDocument.GoTo what:=wdGoToBookmark, Name:="Here"

How do I make the current selection "be visible" in the document window?

TIA
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < zSplash > écrivait :
In this message, < zSplash > wrote:

|| I have just selected a bookmark ("Here"). I want to see (in the window)
the
|| selection/range. I have tried this code, unsuccessfully:
|| ActiveDocument.ActiveWindow.ScrollIntoView Selection.Range, True
||
|| I have also tried the following, but get an error, even though the
bookmark
|| exists (thus, don't know if this would make the selection visible:
|| Application.ActiveDocument.GoTo what:=wdGoToBookmark,
Name:="Here"
||
|| How do I make the current selection "be visible" in the document window?
||

The following will make the bookmarked text visible in the window. At least,
it does on my Word XP:

ActiveDocument.Bookmarks("Here").Range.Select

Normally, the Select method brings the selected item into view.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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