Bring line where cursor is at to top of screen

G

Guest

hi, I use emacs to code quite frequently and there is a command that lets me
bring the line at which the cursor is position to the screen. Essentially it
scrolls down the page to bring that line to the position of the first line. I
would like to know if there is a similar command in MS Word for Windows.

Here is a graphical image of what I mean that represents my screen before
issue the command and affter

*************
*AAAAAAAAAAA*
*BBBBBBBBBBB*
*CCCCCCCCCCC*
*XDDDDDDDD* <<<<X represents my cursor
*EEEEEEEEEEE*
*************

ISSUE COMMAND

*************
*XDDDDDDDDD* <<<THE CURSOR and everythign below it has scrolled up
*EEEEEEEEEEEE*
*FFFFFFFFFFFFFF*
*GGGGGGGGGG*
*HHHHHHHHHH*
*************

Thanks Jay

jk0thari AT gmail DOT com

replace the Zero with the letter o
 
H

Helmut Weber

Hi Jay,
try
ActiveWindow.ScrollIntoView Selection.Range, true
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
G

Guest

Hi, I'm not sure exactly what you mean by this. Can you elaborate some more?
I'm a simpel everyday user of Word, and not a developer of or on it.

thanks!
Jay

jayk AT drexel DOT edu
 
G

Guest

So I've created the macro ScrollToCursor...as:

Sub ScrollToCursor()
ActiveWindow.ScrollIntoView Selection.Range, True
'
' ScrollToCursor Macro
' Macro created 11/11/04 by Jay Kothari
'

End Sub

I get an error saying ScrollIntoView is not found (member not found)

I'm somewhat lost... I made it in the normal template...

Jay
 
G

Guest

OK so that sorta works....

if the cursor is off the page it will bring it "into range" which is
essentially the middle of the viewing range

i need it to come to the top of viewing range....

any help?
 

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